
// Generated from HogQLParser.g4 by ANTLR 4.13.2


#include "HogQLParserVisitor.h"

#include "HogQLParser.h"


using namespace antlrcpp;

using namespace antlr4;

namespace {

struct HogQLParserStaticData final {
  HogQLParserStaticData(std::vector<std::string> ruleNames,
                        std::vector<std::string> literalNames,
                        std::vector<std::string> symbolicNames)
      : ruleNames(std::move(ruleNames)), literalNames(std::move(literalNames)),
        symbolicNames(std::move(symbolicNames)),
        vocabulary(this->literalNames, this->symbolicNames) {}

  HogQLParserStaticData(const HogQLParserStaticData&) = delete;
  HogQLParserStaticData(HogQLParserStaticData&&) = delete;
  HogQLParserStaticData& operator=(const HogQLParserStaticData&) = delete;
  HogQLParserStaticData& operator=(HogQLParserStaticData&&) = delete;

  std::vector<antlr4::dfa::DFA> decisionToDFA;
  antlr4::atn::PredictionContextCache sharedContextCache;
  const std::vector<std::string> ruleNames;
  const std::vector<std::string> literalNames;
  const std::vector<std::string> symbolicNames;
  const antlr4::dfa::Vocabulary vocabulary;
  antlr4::atn::SerializedATNView serializedATN;
  std::unique_ptr<antlr4::atn::ATN> atn;
};

::antlr4::internal::OnceFlag hogqlparserParserOnceFlag;
#if ANTLR4_USE_THREAD_LOCAL_CACHE
static thread_local
#endif
std::unique_ptr<HogQLParserStaticData> hogqlparserParserStaticData = nullptr;

void hogqlparserParserInitialize() {
#if ANTLR4_USE_THREAD_LOCAL_CACHE
  if (hogqlparserParserStaticData != nullptr) {
    return;
  }
#else
  assert(hogqlparserParserStaticData == nullptr);
#endif
  auto staticData = std::make_unique<HogQLParserStaticData>(
    std::vector<std::string>{
      "program", "declaration", "expression", "varDecl", "identifierList", 
      "statement", "returnStmt", "throwStmt", "catchBlock", "tryCatchStmt", 
      "ifStmt", "whileStmt", "forStmt", "forInStmt", "funcStmt", "varAssignment", 
      "exprStmt", "emptyStmt", "block", "kvPair", "kvPairList", "select", 
      "selectStmtWithParens", "subsequentSelectSetClause", "selectSetStmt", 
      "selectStmt", "withClause", "topClause", "fromClause", "arrayJoinClause", 
      "windowClause", "prewhereClause", "whereClause", "groupByClause", 
      "havingClause", "orderByClause", "projectionOrderByClause", "limitByClause", 
      "limitAndOffsetClause", "offsetOnlyClause", "settingsClause", "joinExpr", 
      "joinOp", "joinOpCross", "joinConstraintClause", "sampleClause", "limitExpr", 
      "orderExprList", "orderExpr", "ratioExpr", "settingExprList", "settingExpr", 
      "windowExpr", "winPartitionByClause", "winOrderByClause", "winFrameClause", 
      "winFrameExtend", "winFrameBound", "expr", "columnTypeExpr", "columnExprList", 
      "columnExpr", "columnLambdaExpr", "hogqlxChildElement", "hogqlxText", 
      "hogqlxTagElement", "hogqlxTagAttribute", "withExprList", "withExpr", 
      "columnIdentifier", "nestedIdentifier", "tableExpr", "tableFunctionExpr", 
      "tableIdentifier", "tableArgList", "databaseIdentifier", "floatingLiteral", 
      "numberLiteral", "literal", "interval", "keyword", "keywordForAlias", 
      "alias", "identifier", "enumValue", "placeholder", "string", "templateString", 
      "stringContents", "fullTemplateString", "stringContentsFull"
    },
    std::vector<std::string>{
      "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", 
      "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", 
      "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", 
      "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", 
      "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", 
      "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", 
      "", "", "", "", "", "", "", "", "", "", "", "", "'->'", "'*'", "'`'", 
      "'\\'", "':'", "','", "'||'", "'-'", "'$'", "'.'", "'=='", "", "'>='", 
      "", "'#'", "'~*'", "'=~*'", "'{'", "'['", "'('", "'<='", "'<'", "'</'", 
      "", "'!~*'", "'!~'", "'\\u003F.'", "'\\u003F\\u003F'", "'%'", "'+'", 
      "'\\u003F'", "'\"'", "'f''", "'F''", "'''", "'~'", "'=~'", "'}'", 
      "']'", "')'", "';'", "'/'", "", "'_'"
    },
    std::vector<std::string>{
      "", "ALL", "AND", "ANTI", "ANY", "ARRAY", "AS", "ASCENDING", "ASOF", 
      "BETWEEN", "BOTH", "BY", "CASE", "CAST", "CATCH", "COHORT", "COLLATE", 
      "CROSS", "CUBE", "CURRENT", "DATE", "DAY", "DESC", "DESCENDING", "DISTINCT", 
      "ELSE", "END", "EXCEPT", "EXTRACT", "FINAL", "FINALLY", "FIRST", "FN", 
      "FOLLOWING", "FOR", "FROM", "FULL", "FUN", "GROUP", "HAVING", "HOUR", 
      "ID", "IF", "ILIKE", "IN", "INF", "INNER", "INTERSECT", "INTERVAL", 
      "IS", "JOIN", "KEY", "LAST", "LEADING", "LEFT", "LET", "LIKE", "LIMIT", 
      "MINUTE", "MONTH", "NAN_SQL", "NOT", "NULL_SQL", "NULLS", "OFFSET", 
      "ON", "OR", "ORDER", "OUTER", "OVER", "PARTITION", "PRECEDING", "PREWHERE", 
      "QUARTER", "RANGE", "RETURN", "RIGHT", "ROLLUP", "ROW", "ROWS", "SAMPLE", 
      "SECOND", "SELECT", "SEMI", "SETTINGS", "SUBSTRING", "THEN", "THROW", 
      "TIES", "TIMESTAMP", "TO", "TOP", "TOTALS", "TRAILING", "TRIM", "TRUNCATE", 
      "TRY", "UNBOUNDED", "UNION", "USING", "WEEK", "WHEN", "WHERE", "WHILE", 
      "WINDOW", "WITH", "YEAR", "ESCAPE_CHAR_COMMON", "IDENTIFIER", "FLOATING_LITERAL", 
      "OCTAL_LITERAL", "DECIMAL_LITERAL", "HEXADECIMAL_LITERAL", "STRING_LITERAL", 
      "ARROW", "ASTERISK", "BACKQUOTE", "BACKSLASH", "COLON", "COMMA", "CONCAT", 
      "DASH", "DOLLAR", "DOT", "EQ_DOUBLE", "EQ_SINGLE", "GT_EQ", "GT", 
      "HASH", "IREGEX_SINGLE", "IREGEX_DOUBLE", "LBRACE", "LBRACKET", "LPAREN", 
      "LT_EQ", "LT", "LT_SLASH", "NOT_EQ", "NOT_IREGEX", "NOT_REGEX", "NULL_PROPERTY", 
      "NULLISH", "PERCENT", "PLUS", "QUERY", "QUOTE_DOUBLE", "QUOTE_SINGLE_TEMPLATE", 
      "QUOTE_SINGLE_TEMPLATE_FULL", "QUOTE_SINGLE", "REGEX_SINGLE", "REGEX_DOUBLE", 
      "RBRACE", "RBRACKET", "RPAREN", "SEMICOLON", "SLASH", "SLASH_GT", 
      "UNDERSCORE", "MULTI_LINE_COMMENT", "SINGLE_LINE_COMMENT", "WHITESPACE", 
      "STRING_TEXT", "STRING_ESCAPE_TRIGGER", "FULL_STRING_TEXT", "FULL_STRING_ESCAPE_TRIGGER", 
      "TAG_WS", "TAGC_WS", "HOGQLX_TEXT_TEXT", "HOGQLX_TEXT_WS"
    }
  );
  static const int32_t serializedATNSegment[] = {
  	4,1,168,1343,2,0,7,0,2,1,7,1,2,2,7,2,2,3,7,3,2,4,7,4,2,5,7,5,2,6,7,6,
  	2,7,7,7,2,8,7,8,2,9,7,9,2,10,7,10,2,11,7,11,2,12,7,12,2,13,7,13,2,14,
  	7,14,2,15,7,15,2,16,7,16,2,17,7,17,2,18,7,18,2,19,7,19,2,20,7,20,2,21,
  	7,21,2,22,7,22,2,23,7,23,2,24,7,24,2,25,7,25,2,26,7,26,2,27,7,27,2,28,
  	7,28,2,29,7,29,2,30,7,30,2,31,7,31,2,32,7,32,2,33,7,33,2,34,7,34,2,35,
  	7,35,2,36,7,36,2,37,7,37,2,38,7,38,2,39,7,39,2,40,7,40,2,41,7,41,2,42,
  	7,42,2,43,7,43,2,44,7,44,2,45,7,45,2,46,7,46,2,47,7,47,2,48,7,48,2,49,
  	7,49,2,50,7,50,2,51,7,51,2,52,7,52,2,53,7,53,2,54,7,54,2,55,7,55,2,56,
  	7,56,2,57,7,57,2,58,7,58,2,59,7,59,2,60,7,60,2,61,7,61,2,62,7,62,2,63,
  	7,63,2,64,7,64,2,65,7,65,2,66,7,66,2,67,7,67,2,68,7,68,2,69,7,69,2,70,
  	7,70,2,71,7,71,2,72,7,72,2,73,7,73,2,74,7,74,2,75,7,75,2,76,7,76,2,77,
  	7,77,2,78,7,78,2,79,7,79,2,80,7,80,2,81,7,81,2,82,7,82,2,83,7,83,2,84,
  	7,84,2,85,7,85,2,86,7,86,2,87,7,87,2,88,7,88,2,89,7,89,2,90,7,90,1,0,
  	5,0,184,8,0,10,0,12,0,187,9,0,1,0,1,0,1,1,1,1,3,1,193,8,1,1,2,1,2,1,3,
  	1,3,1,3,1,3,1,3,3,3,202,8,3,1,4,1,4,1,4,5,4,207,8,4,10,4,12,4,210,9,4,
  	1,4,3,4,213,8,4,1,5,1,5,1,5,1,5,1,5,1,5,1,5,1,5,1,5,1,5,1,5,1,5,3,5,227,
  	8,5,1,6,1,6,3,6,231,8,6,1,6,3,6,234,8,6,1,7,1,7,3,7,238,8,7,1,7,3,7,241,
  	8,7,1,8,1,8,1,8,1,8,1,8,3,8,248,8,8,1,8,1,8,3,8,252,8,8,1,8,1,8,1,9,1,
  	9,1,9,5,9,259,8,9,10,9,12,9,262,9,9,1,9,1,9,3,9,266,8,9,1,10,1,10,1,10,
  	1,10,1,10,1,10,1,10,3,10,275,8,10,1,11,1,11,1,11,1,11,1,11,1,11,3,11,
  	283,8,11,1,12,1,12,1,12,1,12,1,12,3,12,290,8,12,1,12,1,12,3,12,294,8,
  	12,1,12,1,12,1,12,1,12,3,12,300,8,12,1,12,1,12,1,12,3,12,305,8,12,1,13,
  	1,13,1,13,1,13,1,13,1,13,3,13,313,8,13,1,13,1,13,1,13,1,13,1,13,3,13,
  	320,8,13,1,14,1,14,1,14,1,14,3,14,326,8,14,1,14,1,14,1,14,1,15,1,15,1,
  	15,1,15,1,15,1,16,1,16,3,16,338,8,16,1,17,1,17,1,18,1,18,5,18,344,8,18,
  	10,18,12,18,347,9,18,1,18,1,18,1,19,1,19,1,19,1,19,1,20,1,20,1,20,5,20,
  	358,8,20,10,20,12,20,361,9,20,1,20,3,20,364,8,20,1,21,1,21,1,21,3,21,
  	369,8,21,1,21,3,21,372,8,21,1,21,1,21,1,22,1,22,1,22,1,22,1,22,1,22,3,
  	22,382,8,22,1,23,1,23,1,23,1,23,1,23,1,23,1,23,1,23,3,23,392,8,23,1,23,
  	1,23,1,24,1,24,5,24,398,8,24,10,24,12,24,401,9,24,1,25,3,25,404,8,25,
  	1,25,1,25,3,25,408,8,25,1,25,3,25,411,8,25,1,25,1,25,3,25,415,8,25,1,
  	25,3,25,418,8,25,1,25,3,25,421,8,25,1,25,3,25,424,8,25,1,25,3,25,427,
  	8,25,1,25,1,25,3,25,431,8,25,1,25,1,25,3,25,435,8,25,1,25,3,25,438,8,
  	25,1,25,3,25,441,8,25,1,25,3,25,444,8,25,1,25,3,25,447,8,25,1,25,1,25,
  	3,25,451,8,25,1,25,3,25,454,8,25,1,26,1,26,1,26,1,27,1,27,1,27,1,27,3,
  	27,463,8,27,1,28,1,28,1,28,1,29,3,29,469,8,29,1,29,1,29,1,29,1,29,1,30,
  	1,30,1,30,1,30,1,30,1,30,1,30,1,30,1,30,1,30,1,30,1,30,1,30,5,30,488,
  	8,30,10,30,12,30,491,9,30,1,31,1,31,1,31,1,32,1,32,1,32,1,33,1,33,1,33,
  	1,33,1,33,1,33,1,33,1,33,3,33,507,8,33,1,34,1,34,1,34,1,35,1,35,1,35,
  	1,35,1,36,1,36,1,36,1,36,1,37,1,37,1,37,1,37,1,37,1,38,1,38,1,38,1,38,
  	3,38,529,8,38,1,38,1,38,3,38,533,8,38,1,38,1,38,1,38,1,38,3,38,539,8,
  	38,1,38,1,38,1,38,3,38,544,8,38,1,39,1,39,1,39,1,40,1,40,1,40,1,41,1,
  	41,1,41,3,41,555,8,41,1,41,3,41,558,8,41,1,41,1,41,1,41,1,41,3,41,564,
  	8,41,1,41,1,41,1,41,1,41,1,41,1,41,3,41,572,8,41,1,41,1,41,1,41,1,41,
  	5,41,578,8,41,10,41,12,41,581,9,41,1,42,3,42,584,8,42,1,42,1,42,1,42,
  	3,42,589,8,42,1,42,3,42,592,8,42,1,42,3,42,595,8,42,1,42,1,42,3,42,599,
  	8,42,1,42,1,42,3,42,603,8,42,1,42,3,42,606,8,42,3,42,608,8,42,1,42,3,
  	42,611,8,42,1,42,1,42,3,42,615,8,42,1,42,1,42,3,42,619,8,42,1,42,3,42,
  	622,8,42,3,42,624,8,42,3,42,626,8,42,1,43,1,43,1,43,3,43,631,8,43,1,44,
  	1,44,1,44,1,44,1,44,1,44,1,44,1,44,1,44,3,44,642,8,44,1,45,1,45,1,45,
  	1,45,3,45,648,8,45,1,46,1,46,1,46,3,46,653,8,46,1,47,1,47,1,47,5,47,658,
  	8,47,10,47,12,47,661,9,47,1,48,1,48,3,48,665,8,48,1,48,1,48,3,48,669,
  	8,48,1,48,1,48,3,48,673,8,48,1,49,1,49,1,49,1,49,3,49,679,8,49,3,49,681,
  	8,49,1,50,1,50,1,50,5,50,686,8,50,10,50,12,50,689,9,50,1,51,1,51,1,51,
  	1,51,1,52,3,52,696,8,52,1,52,3,52,699,8,52,1,52,3,52,702,8,52,1,53,1,
  	53,1,53,1,53,1,54,1,54,1,54,1,54,1,55,1,55,1,55,1,56,1,56,1,56,1,56,1,
  	56,1,56,3,56,721,8,56,1,57,1,57,1,57,1,57,1,57,1,57,1,57,1,57,1,57,1,
  	57,1,57,1,57,3,57,735,8,57,1,58,1,58,1,58,1,59,1,59,1,59,1,59,1,59,1,
  	59,1,59,1,59,1,59,5,59,749,8,59,10,59,12,59,752,9,59,1,59,3,59,755,8,
  	59,1,59,1,59,1,59,1,59,1,59,1,59,1,59,5,59,764,8,59,10,59,12,59,767,9,
  	59,1,59,3,59,770,8,59,1,59,1,59,1,59,1,59,1,59,1,59,1,59,5,59,779,8,59,
  	10,59,12,59,782,9,59,1,59,3,59,785,8,59,1,59,1,59,1,59,1,59,1,59,3,59,
  	792,8,59,1,59,1,59,3,59,796,8,59,1,60,1,60,1,60,5,60,801,8,60,10,60,12,
  	60,804,9,60,1,60,3,60,807,8,60,1,61,1,61,1,61,3,61,812,8,61,1,61,1,61,
  	1,61,1,61,1,61,4,61,819,8,61,11,61,12,61,820,1,61,1,61,3,61,825,8,61,
  	1,61,1,61,1,61,1,61,1,61,1,61,1,61,1,61,1,61,1,61,1,61,1,61,1,61,1,61,
  	1,61,1,61,1,61,1,61,1,61,1,61,1,61,1,61,1,61,1,61,3,61,851,8,61,1,61,
  	1,61,1,61,1,61,1,61,1,61,1,61,1,61,1,61,1,61,1,61,1,61,1,61,1,61,1,61,
  	3,61,868,8,61,1,61,1,61,1,61,1,61,3,61,874,8,61,1,61,3,61,877,8,61,1,
  	61,3,61,880,8,61,1,61,1,61,1,61,1,61,1,61,1,61,1,61,1,61,3,61,890,8,61,
  	1,61,1,61,1,61,1,61,3,61,896,8,61,1,61,3,61,899,8,61,1,61,3,61,902,8,
  	61,1,61,1,61,1,61,1,61,1,61,1,61,3,61,910,8,61,1,61,3,61,913,8,61,1,61,
  	1,61,3,61,917,8,61,1,61,3,61,920,8,61,1,61,1,61,1,61,1,61,1,61,1,61,1,
  	61,1,61,1,61,1,61,1,61,1,61,3,61,934,8,61,1,61,1,61,1,61,1,61,1,61,1,
  	61,1,61,1,61,1,61,1,61,1,61,1,61,1,61,1,61,1,61,3,61,951,8,61,1,61,1,
  	61,1,61,3,61,956,8,61,1,61,1,61,1,61,3,61,961,8,61,1,61,1,61,1,61,1,61,
  	3,61,967,8,61,1,61,1,61,1,61,1,61,1,61,3,61,974,8,61,1,61,1,61,1,61,1,
  	61,1,61,1,61,1,61,1,61,1,61,1,61,3,61,986,8,61,1,61,1,61,3,61,990,8,61,
  	1,61,3,61,993,8,61,1,61,1,61,1,61,1,61,1,61,1,61,1,61,3,61,1002,8,61,
  	1,61,1,61,1,61,1,61,1,61,1,61,1,61,1,61,1,61,1,61,1,61,1,61,3,61,1016,
  	8,61,1,61,1,61,1,61,1,61,1,61,1,61,1,61,1,61,1,61,1,61,1,61,1,61,1,61,
  	1,61,1,61,1,61,1,61,1,61,1,61,3,61,1037,8,61,1,61,1,61,1,61,1,61,1,61,
  	1,61,1,61,1,61,1,61,1,61,1,61,1,61,1,61,1,61,1,61,1,61,1,61,1,61,1,61,
  	1,61,1,61,1,61,1,61,1,61,1,61,1,61,1,61,3,61,1066,8,61,1,61,1,61,1,61,
  	1,61,1,61,1,61,3,61,1074,8,61,5,61,1076,8,61,10,61,12,61,1079,9,61,1,
  	62,1,62,1,62,1,62,5,62,1085,8,62,10,62,12,62,1088,9,62,1,62,3,62,1091,
  	8,62,1,62,1,62,1,62,1,62,1,62,5,62,1098,8,62,10,62,12,62,1101,9,62,1,
  	62,3,62,1104,8,62,1,62,1,62,3,62,1108,8,62,1,62,1,62,1,62,3,62,1113,8,
  	62,1,63,1,63,1,63,1,63,1,63,1,63,3,63,1121,8,63,1,64,1,64,1,65,1,65,1,
  	65,5,65,1128,8,65,10,65,12,65,1131,9,65,1,65,1,65,1,65,1,65,1,65,5,65,
  	1138,8,65,10,65,12,65,1141,9,65,1,65,1,65,5,65,1145,8,65,10,65,12,65,
  	1148,9,65,1,65,1,65,1,65,1,65,3,65,1154,8,65,1,66,1,66,1,66,1,66,1,66,
  	1,66,1,66,1,66,1,66,1,66,1,66,3,66,1167,8,66,1,67,1,67,1,67,5,67,1172,
  	8,67,10,67,12,67,1175,9,67,1,67,3,67,1178,8,67,1,68,1,68,1,68,1,68,1,
  	68,1,68,1,68,1,68,1,68,1,68,3,68,1190,8,68,1,69,1,69,1,69,1,69,3,69,1196,
  	8,69,1,69,3,69,1199,8,69,1,70,1,70,1,70,5,70,1204,8,70,10,70,12,70,1207,
  	9,70,1,71,1,71,1,71,1,71,1,71,1,71,1,71,1,71,1,71,3,71,1218,8,71,1,71,
  	1,71,1,71,1,71,3,71,1224,8,71,5,71,1226,8,71,10,71,12,71,1229,9,71,1,
  	72,1,72,1,72,3,72,1234,8,72,1,72,1,72,1,73,1,73,1,73,3,73,1241,8,73,1,
  	73,1,73,1,74,1,74,1,74,5,74,1248,8,74,10,74,12,74,1251,9,74,1,74,3,74,
  	1254,8,74,1,75,1,75,1,76,1,76,1,76,1,76,1,76,1,76,3,76,1264,8,76,3,76,
  	1266,8,76,1,77,3,77,1269,8,77,1,77,1,77,1,77,1,77,1,77,1,77,3,77,1277,
  	8,77,1,78,1,78,1,78,3,78,1282,8,78,1,79,1,79,1,80,1,80,1,81,1,81,1,82,
  	1,82,3,82,1292,8,82,1,83,1,83,1,83,3,83,1297,8,83,1,84,1,84,1,84,1,84,
  	1,85,1,85,1,85,1,85,1,86,1,86,3,86,1309,8,86,1,87,1,87,5,87,1313,8,87,
  	10,87,12,87,1316,9,87,1,87,1,87,1,88,1,88,1,88,1,88,1,88,3,88,1325,8,
  	88,1,89,1,89,5,89,1329,8,89,10,89,12,89,1332,9,89,1,89,1,89,1,90,1,90,
  	1,90,1,90,1,90,3,90,1341,8,90,1,90,0,3,82,122,142,91,0,2,4,6,8,10,12,
  	14,16,18,20,22,24,26,28,30,32,34,36,38,40,42,44,46,48,50,52,54,56,58,
  	60,62,64,66,68,70,72,74,76,78,80,82,84,86,88,90,92,94,96,98,100,102,104,
  	106,108,110,112,114,116,118,120,122,124,126,128,130,132,134,136,138,140,
  	142,144,146,148,150,152,154,156,158,160,162,164,166,168,170,172,174,176,
  	178,180,0,18,2,0,32,32,37,37,2,0,18,18,77,77,2,0,46,46,54,54,3,0,1,1,
  	4,4,8,8,4,0,1,1,3,4,8,8,83,83,2,0,54,54,76,76,2,0,1,1,4,4,2,0,64,64,119,
  	119,2,0,7,7,22,23,2,0,31,31,52,52,2,0,74,74,79,79,3,0,10,10,53,53,93,
  	93,2,0,43,43,56,56,1,0,110,111,2,0,121,121,143,143,7,0,21,21,40,40,58,
  	59,73,73,81,81,100,100,106,106,19,0,1,13,15,20,22,26,28,29,31,31,33,36,
  	38,39,41,44,46,46,48,54,56,57,61,61,63,72,74,80,82,86,88,95,97,99,101,
  	102,104,105,4,0,20,20,31,31,41,41,51,51,1517,0,185,1,0,0,0,2,192,1,0,
  	0,0,4,194,1,0,0,0,6,196,1,0,0,0,8,203,1,0,0,0,10,226,1,0,0,0,12,228,1,
  	0,0,0,14,235,1,0,0,0,16,242,1,0,0,0,18,255,1,0,0,0,20,267,1,0,0,0,22,
  	276,1,0,0,0,24,284,1,0,0,0,26,306,1,0,0,0,28,321,1,0,0,0,30,330,1,0,0,
  	0,32,335,1,0,0,0,34,339,1,0,0,0,36,341,1,0,0,0,38,350,1,0,0,0,40,354,
  	1,0,0,0,42,368,1,0,0,0,44,381,1,0,0,0,46,391,1,0,0,0,48,395,1,0,0,0,50,
  	403,1,0,0,0,52,455,1,0,0,0,54,458,1,0,0,0,56,464,1,0,0,0,58,468,1,0,0,
  	0,60,474,1,0,0,0,62,492,1,0,0,0,64,495,1,0,0,0,66,498,1,0,0,0,68,508,
  	1,0,0,0,70,511,1,0,0,0,72,515,1,0,0,0,74,519,1,0,0,0,76,543,1,0,0,0,78,
  	545,1,0,0,0,80,548,1,0,0,0,82,563,1,0,0,0,84,625,1,0,0,0,86,630,1,0,0,
  	0,88,641,1,0,0,0,90,643,1,0,0,0,92,649,1,0,0,0,94,654,1,0,0,0,96,662,
  	1,0,0,0,98,680,1,0,0,0,100,682,1,0,0,0,102,690,1,0,0,0,104,695,1,0,0,
  	0,106,703,1,0,0,0,108,707,1,0,0,0,110,711,1,0,0,0,112,720,1,0,0,0,114,
  	734,1,0,0,0,116,736,1,0,0,0,118,795,1,0,0,0,120,797,1,0,0,0,122,960,1,
  	0,0,0,124,1107,1,0,0,0,126,1120,1,0,0,0,128,1122,1,0,0,0,130,1153,1,0,
  	0,0,132,1166,1,0,0,0,134,1168,1,0,0,0,136,1189,1,0,0,0,138,1198,1,0,0,
  	0,140,1200,1,0,0,0,142,1217,1,0,0,0,144,1230,1,0,0,0,146,1240,1,0,0,0,
  	148,1244,1,0,0,0,150,1255,1,0,0,0,152,1265,1,0,0,0,154,1268,1,0,0,0,156,
  	1281,1,0,0,0,158,1283,1,0,0,0,160,1285,1,0,0,0,162,1287,1,0,0,0,164,1291,
  	1,0,0,0,166,1296,1,0,0,0,168,1298,1,0,0,0,170,1302,1,0,0,0,172,1308,1,
  	0,0,0,174,1310,1,0,0,0,176,1324,1,0,0,0,178,1326,1,0,0,0,180,1340,1,0,
  	0,0,182,184,3,2,1,0,183,182,1,0,0,0,184,187,1,0,0,0,185,183,1,0,0,0,185,
  	186,1,0,0,0,186,188,1,0,0,0,187,185,1,0,0,0,188,189,5,0,0,1,189,1,1,0,
  	0,0,190,193,3,6,3,0,191,193,3,10,5,0,192,190,1,0,0,0,192,191,1,0,0,0,
  	193,3,1,0,0,0,194,195,3,122,61,0,195,5,1,0,0,0,196,197,5,55,0,0,197,201,
  	3,166,83,0,198,199,5,118,0,0,199,200,5,125,0,0,200,202,3,4,2,0,201,198,
  	1,0,0,0,201,202,1,0,0,0,202,7,1,0,0,0,203,208,3,166,83,0,204,205,5,119,
  	0,0,205,207,3,166,83,0,206,204,1,0,0,0,207,210,1,0,0,0,208,206,1,0,0,
  	0,208,209,1,0,0,0,209,212,1,0,0,0,210,208,1,0,0,0,211,213,5,119,0,0,212,
  	211,1,0,0,0,212,213,1,0,0,0,213,9,1,0,0,0,214,227,3,12,6,0,215,227,3,
  	14,7,0,216,227,3,18,9,0,217,227,3,20,10,0,218,227,3,22,11,0,219,227,3,
  	26,13,0,220,227,3,24,12,0,221,227,3,28,14,0,222,227,3,30,15,0,223,227,
  	3,36,18,0,224,227,3,32,16,0,225,227,3,34,17,0,226,214,1,0,0,0,226,215,
  	1,0,0,0,226,216,1,0,0,0,226,217,1,0,0,0,226,218,1,0,0,0,226,219,1,0,0,
  	0,226,220,1,0,0,0,226,221,1,0,0,0,226,222,1,0,0,0,226,223,1,0,0,0,226,
  	224,1,0,0,0,226,225,1,0,0,0,227,11,1,0,0,0,228,230,5,75,0,0,229,231,3,
  	4,2,0,230,229,1,0,0,0,230,231,1,0,0,0,231,233,1,0,0,0,232,234,5,154,0,
  	0,233,232,1,0,0,0,233,234,1,0,0,0,234,13,1,0,0,0,235,237,5,87,0,0,236,
  	238,3,4,2,0,237,236,1,0,0,0,237,238,1,0,0,0,238,240,1,0,0,0,239,241,5,
  	154,0,0,240,239,1,0,0,0,240,241,1,0,0,0,241,15,1,0,0,0,242,251,5,14,0,
  	0,243,244,5,133,0,0,244,247,3,166,83,0,245,246,5,118,0,0,246,248,3,166,
  	83,0,247,245,1,0,0,0,247,248,1,0,0,0,248,249,1,0,0,0,249,250,5,153,0,
  	0,250,252,1,0,0,0,251,243,1,0,0,0,251,252,1,0,0,0,252,253,1,0,0,0,253,
  	254,3,36,18,0,254,17,1,0,0,0,255,256,5,96,0,0,256,260,3,36,18,0,257,259,
  	3,16,8,0,258,257,1,0,0,0,259,262,1,0,0,0,260,258,1,0,0,0,260,261,1,0,
  	0,0,261,265,1,0,0,0,262,260,1,0,0,0,263,264,5,30,0,0,264,266,3,36,18,
  	0,265,263,1,0,0,0,265,266,1,0,0,0,266,19,1,0,0,0,267,268,5,42,0,0,268,
  	269,5,133,0,0,269,270,3,4,2,0,270,271,5,153,0,0,271,274,3,10,5,0,272,
  	273,5,25,0,0,273,275,3,10,5,0,274,272,1,0,0,0,274,275,1,0,0,0,275,21,
  	1,0,0,0,276,277,5,103,0,0,277,278,5,133,0,0,278,279,3,4,2,0,279,280,5,
  	153,0,0,280,282,3,10,5,0,281,283,5,154,0,0,282,281,1,0,0,0,282,283,1,
  	0,0,0,283,23,1,0,0,0,284,285,5,34,0,0,285,289,5,133,0,0,286,290,3,6,3,
  	0,287,290,3,30,15,0,288,290,3,4,2,0,289,286,1,0,0,0,289,287,1,0,0,0,289,
  	288,1,0,0,0,289,290,1,0,0,0,290,291,1,0,0,0,291,293,5,154,0,0,292,294,
  	3,4,2,0,293,292,1,0,0,0,293,294,1,0,0,0,294,295,1,0,0,0,295,299,5,154,
  	0,0,296,300,3,6,3,0,297,300,3,30,15,0,298,300,3,4,2,0,299,296,1,0,0,0,
  	299,297,1,0,0,0,299,298,1,0,0,0,299,300,1,0,0,0,300,301,1,0,0,0,301,302,
  	5,153,0,0,302,304,3,10,5,0,303,305,5,154,0,0,304,303,1,0,0,0,304,305,
  	1,0,0,0,305,25,1,0,0,0,306,307,5,34,0,0,307,308,5,133,0,0,308,309,5,55,
  	0,0,309,312,3,166,83,0,310,311,5,119,0,0,311,313,3,166,83,0,312,310,1,
  	0,0,0,312,313,1,0,0,0,313,314,1,0,0,0,314,315,5,44,0,0,315,316,3,4,2,
  	0,316,317,5,153,0,0,317,319,3,10,5,0,318,320,5,154,0,0,319,318,1,0,0,
  	0,319,320,1,0,0,0,320,27,1,0,0,0,321,322,7,0,0,0,322,323,3,166,83,0,323,
  	325,5,133,0,0,324,326,3,8,4,0,325,324,1,0,0,0,325,326,1,0,0,0,326,327,
  	1,0,0,0,327,328,5,153,0,0,328,329,3,36,18,0,329,29,1,0,0,0,330,331,3,
  	4,2,0,331,332,5,118,0,0,332,333,5,125,0,0,333,334,3,4,2,0,334,31,1,0,
  	0,0,335,337,3,4,2,0,336,338,5,154,0,0,337,336,1,0,0,0,337,338,1,0,0,0,
  	338,33,1,0,0,0,339,340,5,154,0,0,340,35,1,0,0,0,341,345,5,131,0,0,342,
  	344,3,2,1,0,343,342,1,0,0,0,344,347,1,0,0,0,345,343,1,0,0,0,345,346,1,
  	0,0,0,346,348,1,0,0,0,347,345,1,0,0,0,348,349,5,151,0,0,349,37,1,0,0,
  	0,350,351,3,4,2,0,351,352,5,118,0,0,352,353,3,4,2,0,353,39,1,0,0,0,354,
  	359,3,38,19,0,355,356,5,119,0,0,356,358,3,38,19,0,357,355,1,0,0,0,358,
  	361,1,0,0,0,359,357,1,0,0,0,359,360,1,0,0,0,360,363,1,0,0,0,361,359,1,
  	0,0,0,362,364,5,119,0,0,363,362,1,0,0,0,363,364,1,0,0,0,364,41,1,0,0,
  	0,365,369,3,48,24,0,366,369,3,50,25,0,367,369,3,130,65,0,368,365,1,0,
  	0,0,368,366,1,0,0,0,368,367,1,0,0,0,369,371,1,0,0,0,370,372,5,154,0,0,
  	371,370,1,0,0,0,371,372,1,0,0,0,372,373,1,0,0,0,373,374,5,0,0,1,374,43,
  	1,0,0,0,375,382,3,50,25,0,376,377,5,133,0,0,377,378,3,48,24,0,378,379,
  	5,153,0,0,379,382,1,0,0,0,380,382,3,170,85,0,381,375,1,0,0,0,381,376,
  	1,0,0,0,381,380,1,0,0,0,382,45,1,0,0,0,383,392,5,27,0,0,384,385,5,98,
  	0,0,385,392,5,1,0,0,386,387,5,98,0,0,387,392,5,24,0,0,388,392,5,47,0,
  	0,389,390,5,47,0,0,390,392,5,24,0,0,391,383,1,0,0,0,391,384,1,0,0,0,391,
  	386,1,0,0,0,391,388,1,0,0,0,391,389,1,0,0,0,392,393,1,0,0,0,393,394,3,
  	44,22,0,394,47,1,0,0,0,395,399,3,44,22,0,396,398,3,46,23,0,397,396,1,
  	0,0,0,398,401,1,0,0,0,399,397,1,0,0,0,399,400,1,0,0,0,400,49,1,0,0,0,
  	401,399,1,0,0,0,402,404,3,52,26,0,403,402,1,0,0,0,403,404,1,0,0,0,404,
  	405,1,0,0,0,405,407,5,82,0,0,406,408,5,24,0,0,407,406,1,0,0,0,407,408,
  	1,0,0,0,408,410,1,0,0,0,409,411,3,54,27,0,410,409,1,0,0,0,410,411,1,0,
  	0,0,411,412,1,0,0,0,412,414,3,120,60,0,413,415,3,56,28,0,414,413,1,0,
  	0,0,414,415,1,0,0,0,415,417,1,0,0,0,416,418,3,58,29,0,417,416,1,0,0,0,
  	417,418,1,0,0,0,418,420,1,0,0,0,419,421,3,62,31,0,420,419,1,0,0,0,420,
  	421,1,0,0,0,421,423,1,0,0,0,422,424,3,64,32,0,423,422,1,0,0,0,423,424,
  	1,0,0,0,424,426,1,0,0,0,425,427,3,66,33,0,426,425,1,0,0,0,426,427,1,0,
  	0,0,427,430,1,0,0,0,428,429,5,105,0,0,429,431,7,1,0,0,430,428,1,0,0,0,
  	430,431,1,0,0,0,431,434,1,0,0,0,432,433,5,105,0,0,433,435,5,92,0,0,434,
  	432,1,0,0,0,434,435,1,0,0,0,435,437,1,0,0,0,436,438,3,68,34,0,437,436,
  	1,0,0,0,437,438,1,0,0,0,438,440,1,0,0,0,439,441,3,60,30,0,440,439,1,0,
  	0,0,440,441,1,0,0,0,441,443,1,0,0,0,442,444,3,70,35,0,443,442,1,0,0,0,
  	443,444,1,0,0,0,444,446,1,0,0,0,445,447,3,74,37,0,446,445,1,0,0,0,446,
  	447,1,0,0,0,447,450,1,0,0,0,448,451,3,76,38,0,449,451,3,78,39,0,450,448,
  	1,0,0,0,450,449,1,0,0,0,450,451,1,0,0,0,451,453,1,0,0,0,452,454,3,80,
  	40,0,453,452,1,0,0,0,453,454,1,0,0,0,454,51,1,0,0,0,455,456,5,105,0,0,
  	456,457,3,134,67,0,457,53,1,0,0,0,458,459,5,91,0,0,459,462,5,111,0,0,
  	460,461,5,105,0,0,461,463,5,88,0,0,462,460,1,0,0,0,462,463,1,0,0,0,463,
  	55,1,0,0,0,464,465,5,35,0,0,465,466,3,82,41,0,466,57,1,0,0,0,467,469,
  	7,2,0,0,468,467,1,0,0,0,468,469,1,0,0,0,469,470,1,0,0,0,470,471,5,5,0,
  	0,471,472,5,50,0,0,472,473,3,120,60,0,473,59,1,0,0,0,474,475,5,104,0,
  	0,475,476,3,166,83,0,476,477,5,6,0,0,477,478,5,133,0,0,478,479,3,104,
  	52,0,479,489,5,153,0,0,480,481,5,119,0,0,481,482,3,166,83,0,482,483,5,
  	6,0,0,483,484,5,133,0,0,484,485,3,104,52,0,485,486,5,153,0,0,486,488,
  	1,0,0,0,487,480,1,0,0,0,488,491,1,0,0,0,489,487,1,0,0,0,489,490,1,0,0,
  	0,490,61,1,0,0,0,491,489,1,0,0,0,492,493,5,72,0,0,493,494,3,122,61,0,
  	494,63,1,0,0,0,495,496,5,102,0,0,496,497,3,122,61,0,497,65,1,0,0,0,498,
  	499,5,38,0,0,499,506,5,11,0,0,500,501,7,1,0,0,501,502,5,133,0,0,502,503,
  	3,120,60,0,503,504,5,153,0,0,504,507,1,0,0,0,505,507,3,120,60,0,506,500,
  	1,0,0,0,506,505,1,0,0,0,507,67,1,0,0,0,508,509,5,39,0,0,509,510,3,122,
  	61,0,510,69,1,0,0,0,511,512,5,67,0,0,512,513,5,11,0,0,513,514,3,94,47,
  	0,514,71,1,0,0,0,515,516,5,67,0,0,516,517,5,11,0,0,517,518,3,120,60,0,
  	518,73,1,0,0,0,519,520,5,57,0,0,520,521,3,92,46,0,521,522,5,11,0,0,522,
  	523,3,120,60,0,523,75,1,0,0,0,524,525,5,57,0,0,525,528,3,122,61,0,526,
  	527,5,119,0,0,527,529,3,122,61,0,528,526,1,0,0,0,528,529,1,0,0,0,529,
  	532,1,0,0,0,530,531,5,105,0,0,531,533,5,88,0,0,532,530,1,0,0,0,532,533,
  	1,0,0,0,533,544,1,0,0,0,534,535,5,57,0,0,535,538,3,122,61,0,536,537,5,
  	105,0,0,537,539,5,88,0,0,538,536,1,0,0,0,538,539,1,0,0,0,539,540,1,0,
  	0,0,540,541,5,64,0,0,541,542,3,122,61,0,542,544,1,0,0,0,543,524,1,0,0,
  	0,543,534,1,0,0,0,544,77,1,0,0,0,545,546,5,64,0,0,546,547,3,122,61,0,
  	547,79,1,0,0,0,548,549,5,84,0,0,549,550,3,100,50,0,550,81,1,0,0,0,551,
  	552,6,41,-1,0,552,554,3,142,71,0,553,555,5,29,0,0,554,553,1,0,0,0,554,
  	555,1,0,0,0,555,557,1,0,0,0,556,558,3,90,45,0,557,556,1,0,0,0,557,558,
  	1,0,0,0,558,564,1,0,0,0,559,560,5,133,0,0,560,561,3,82,41,0,561,562,5,
  	153,0,0,562,564,1,0,0,0,563,551,1,0,0,0,563,559,1,0,0,0,564,579,1,0,0,
  	0,565,566,10,3,0,0,566,567,3,86,43,0,567,568,3,82,41,4,568,578,1,0,0,
  	0,569,571,10,4,0,0,570,572,3,84,42,0,571,570,1,0,0,0,571,572,1,0,0,0,
  	572,573,1,0,0,0,573,574,5,50,0,0,574,575,3,82,41,0,575,576,3,88,44,0,
  	576,578,1,0,0,0,577,565,1,0,0,0,577,569,1,0,0,0,578,581,1,0,0,0,579,577,
  	1,0,0,0,579,580,1,0,0,0,580,83,1,0,0,0,581,579,1,0,0,0,582,584,7,3,0,
  	0,583,582,1,0,0,0,583,584,1,0,0,0,584,585,1,0,0,0,585,592,5,46,0,0,586,
  	588,5,46,0,0,587,589,7,3,0,0,588,587,1,0,0,0,588,589,1,0,0,0,589,592,
  	1,0,0,0,590,592,7,3,0,0,591,583,1,0,0,0,591,586,1,0,0,0,591,590,1,0,0,
  	0,592,626,1,0,0,0,593,595,7,4,0,0,594,593,1,0,0,0,594,595,1,0,0,0,595,
  	596,1,0,0,0,596,598,7,5,0,0,597,599,5,68,0,0,598,597,1,0,0,0,598,599,
  	1,0,0,0,599,608,1,0,0,0,600,602,7,5,0,0,601,603,5,68,0,0,602,601,1,0,
  	0,0,602,603,1,0,0,0,603,605,1,0,0,0,604,606,7,4,0,0,605,604,1,0,0,0,605,
  	606,1,0,0,0,606,608,1,0,0,0,607,594,1,0,0,0,607,600,1,0,0,0,608,626,1,
  	0,0,0,609,611,7,6,0,0,610,609,1,0,0,0,610,611,1,0,0,0,611,612,1,0,0,0,
  	612,614,5,36,0,0,613,615,5,68,0,0,614,613,1,0,0,0,614,615,1,0,0,0,615,
  	624,1,0,0,0,616,618,5,36,0,0,617,619,5,68,0,0,618,617,1,0,0,0,618,619,
  	1,0,0,0,619,621,1,0,0,0,620,622,7,6,0,0,621,620,1,0,0,0,621,622,1,0,0,
  	0,622,624,1,0,0,0,623,610,1,0,0,0,623,616,1,0,0,0,624,626,1,0,0,0,625,
  	591,1,0,0,0,625,607,1,0,0,0,625,623,1,0,0,0,626,85,1,0,0,0,627,628,5,
  	17,0,0,628,631,5,50,0,0,629,631,5,119,0,0,630,627,1,0,0,0,630,629,1,0,
  	0,0,631,87,1,0,0,0,632,633,5,65,0,0,633,642,3,120,60,0,634,635,5,99,0,
  	0,635,636,5,133,0,0,636,637,3,120,60,0,637,638,5,153,0,0,638,642,1,0,
  	0,0,639,640,5,99,0,0,640,642,3,120,60,0,641,632,1,0,0,0,641,634,1,0,0,
  	0,641,639,1,0,0,0,642,89,1,0,0,0,643,644,5,80,0,0,644,647,3,98,49,0,645,
  	646,5,64,0,0,646,648,3,98,49,0,647,645,1,0,0,0,647,648,1,0,0,0,648,91,
  	1,0,0,0,649,652,3,122,61,0,650,651,7,7,0,0,651,653,3,122,61,0,652,650,
  	1,0,0,0,652,653,1,0,0,0,653,93,1,0,0,0,654,659,3,96,48,0,655,656,5,119,
  	0,0,656,658,3,96,48,0,657,655,1,0,0,0,658,661,1,0,0,0,659,657,1,0,0,0,
  	659,660,1,0,0,0,660,95,1,0,0,0,661,659,1,0,0,0,662,664,3,122,61,0,663,
  	665,7,8,0,0,664,663,1,0,0,0,664,665,1,0,0,0,665,668,1,0,0,0,666,667,5,
  	63,0,0,667,669,7,9,0,0,668,666,1,0,0,0,668,669,1,0,0,0,669,672,1,0,0,
  	0,670,671,5,16,0,0,671,673,5,113,0,0,672,670,1,0,0,0,672,673,1,0,0,0,
  	673,97,1,0,0,0,674,681,3,170,85,0,675,678,3,154,77,0,676,677,5,155,0,
  	0,677,679,3,154,77,0,678,676,1,0,0,0,678,679,1,0,0,0,679,681,1,0,0,0,
  	680,674,1,0,0,0,680,675,1,0,0,0,681,99,1,0,0,0,682,687,3,102,51,0,683,
  	684,5,119,0,0,684,686,3,102,51,0,685,683,1,0,0,0,686,689,1,0,0,0,687,
  	685,1,0,0,0,687,688,1,0,0,0,688,101,1,0,0,0,689,687,1,0,0,0,690,691,3,
  	166,83,0,691,692,5,125,0,0,692,693,3,156,78,0,693,103,1,0,0,0,694,696,
  	3,106,53,0,695,694,1,0,0,0,695,696,1,0,0,0,696,698,1,0,0,0,697,699,3,
  	108,54,0,698,697,1,0,0,0,698,699,1,0,0,0,699,701,1,0,0,0,700,702,3,110,
  	55,0,701,700,1,0,0,0,701,702,1,0,0,0,702,105,1,0,0,0,703,704,5,70,0,0,
  	704,705,5,11,0,0,705,706,3,120,60,0,706,107,1,0,0,0,707,708,5,67,0,0,
  	708,709,5,11,0,0,709,710,3,94,47,0,710,109,1,0,0,0,711,712,7,10,0,0,712,
  	713,3,112,56,0,713,111,1,0,0,0,714,721,3,114,57,0,715,716,5,9,0,0,716,
  	717,3,114,57,0,717,718,5,2,0,0,718,719,3,114,57,0,719,721,1,0,0,0,720,
  	714,1,0,0,0,720,715,1,0,0,0,721,113,1,0,0,0,722,723,5,19,0,0,723,735,
  	5,78,0,0,724,725,5,97,0,0,725,735,5,71,0,0,726,727,5,97,0,0,727,735,5,
  	33,0,0,728,729,3,154,77,0,729,730,5,71,0,0,730,735,1,0,0,0,731,732,3,
  	154,77,0,732,733,5,33,0,0,733,735,1,0,0,0,734,722,1,0,0,0,734,724,1,0,
  	0,0,734,726,1,0,0,0,734,728,1,0,0,0,734,731,1,0,0,0,735,115,1,0,0,0,736,
  	737,3,122,61,0,737,738,5,0,0,1,738,117,1,0,0,0,739,796,3,166,83,0,740,
  	741,3,166,83,0,741,742,5,133,0,0,742,743,3,166,83,0,743,750,3,118,59,
  	0,744,745,5,119,0,0,745,746,3,166,83,0,746,747,3,118,59,0,747,749,1,0,
  	0,0,748,744,1,0,0,0,749,752,1,0,0,0,750,748,1,0,0,0,750,751,1,0,0,0,751,
  	754,1,0,0,0,752,750,1,0,0,0,753,755,5,119,0,0,754,753,1,0,0,0,754,755,
  	1,0,0,0,755,756,1,0,0,0,756,757,5,153,0,0,757,796,1,0,0,0,758,759,3,166,
  	83,0,759,760,5,133,0,0,760,765,3,168,84,0,761,762,5,119,0,0,762,764,3,
  	168,84,0,763,761,1,0,0,0,764,767,1,0,0,0,765,763,1,0,0,0,765,766,1,0,
  	0,0,766,769,1,0,0,0,767,765,1,0,0,0,768,770,5,119,0,0,769,768,1,0,0,0,
  	769,770,1,0,0,0,770,771,1,0,0,0,771,772,5,153,0,0,772,796,1,0,0,0,773,
  	774,3,166,83,0,774,775,5,133,0,0,775,780,3,118,59,0,776,777,5,119,0,0,
  	777,779,3,118,59,0,778,776,1,0,0,0,779,782,1,0,0,0,780,778,1,0,0,0,780,
  	781,1,0,0,0,781,784,1,0,0,0,782,780,1,0,0,0,783,785,5,119,0,0,784,783,
  	1,0,0,0,784,785,1,0,0,0,785,786,1,0,0,0,786,787,5,153,0,0,787,796,1,0,
  	0,0,788,789,3,166,83,0,789,791,5,133,0,0,790,792,3,120,60,0,791,790,1,
  	0,0,0,791,792,1,0,0,0,792,793,1,0,0,0,793,794,5,153,0,0,794,796,1,0,0,
  	0,795,739,1,0,0,0,795,740,1,0,0,0,795,758,1,0,0,0,795,773,1,0,0,0,795,
  	788,1,0,0,0,796,119,1,0,0,0,797,802,3,122,61,0,798,799,5,119,0,0,799,
  	801,3,122,61,0,800,798,1,0,0,0,801,804,1,0,0,0,802,800,1,0,0,0,802,803,
  	1,0,0,0,803,806,1,0,0,0,804,802,1,0,0,0,805,807,5,119,0,0,806,805,1,0,
  	0,0,806,807,1,0,0,0,807,121,1,0,0,0,808,809,6,61,-1,0,809,811,5,12,0,
  	0,810,812,3,122,61,0,811,810,1,0,0,0,811,812,1,0,0,0,812,818,1,0,0,0,
  	813,814,5,101,0,0,814,815,3,122,61,0,815,816,5,86,0,0,816,817,3,122,61,
  	0,817,819,1,0,0,0,818,813,1,0,0,0,819,820,1,0,0,0,820,818,1,0,0,0,820,
  	821,1,0,0,0,821,824,1,0,0,0,822,823,5,25,0,0,823,825,3,122,61,0,824,822,
  	1,0,0,0,824,825,1,0,0,0,825,826,1,0,0,0,826,827,5,26,0,0,827,961,1,0,
  	0,0,828,829,5,13,0,0,829,830,5,133,0,0,830,831,3,122,61,0,831,832,5,6,
  	0,0,832,833,3,118,59,0,833,834,5,153,0,0,834,961,1,0,0,0,835,836,5,20,
  	0,0,836,961,5,113,0,0,837,838,5,48,0,0,838,961,5,113,0,0,839,840,5,48,
  	0,0,840,841,3,122,61,0,841,842,3,158,79,0,842,961,1,0,0,0,843,844,5,85,
  	0,0,844,845,5,133,0,0,845,846,3,122,61,0,846,847,5,35,0,0,847,850,3,122,
  	61,0,848,849,5,34,0,0,849,851,3,122,61,0,850,848,1,0,0,0,850,851,1,0,
  	0,0,851,852,1,0,0,0,852,853,5,153,0,0,853,961,1,0,0,0,854,855,5,89,0,
  	0,855,961,5,113,0,0,856,857,5,94,0,0,857,858,5,133,0,0,858,859,7,11,0,
  	0,859,860,3,172,86,0,860,861,5,35,0,0,861,862,3,122,61,0,862,863,5,153,
  	0,0,863,961,1,0,0,0,864,865,3,166,83,0,865,867,5,133,0,0,866,868,3,120,
  	60,0,867,866,1,0,0,0,867,868,1,0,0,0,868,869,1,0,0,0,869,870,5,153,0,
  	0,870,879,1,0,0,0,871,873,5,133,0,0,872,874,5,24,0,0,873,872,1,0,0,0,
  	873,874,1,0,0,0,874,876,1,0,0,0,875,877,3,120,60,0,876,875,1,0,0,0,876,
  	877,1,0,0,0,877,878,1,0,0,0,878,880,5,153,0,0,879,871,1,0,0,0,879,880,
  	1,0,0,0,880,881,1,0,0,0,881,882,5,69,0,0,882,883,5,133,0,0,883,884,3,
  	104,52,0,884,885,5,153,0,0,885,961,1,0,0,0,886,887,3,166,83,0,887,889,
  	5,133,0,0,888,890,3,120,60,0,889,888,1,0,0,0,889,890,1,0,0,0,890,891,
  	1,0,0,0,891,892,5,153,0,0,892,901,1,0,0,0,893,895,5,133,0,0,894,896,5,
  	24,0,0,895,894,1,0,0,0,895,896,1,0,0,0,896,898,1,0,0,0,897,899,3,120,
  	60,0,898,897,1,0,0,0,898,899,1,0,0,0,899,900,1,0,0,0,900,902,5,153,0,
  	0,901,893,1,0,0,0,901,902,1,0,0,0,902,903,1,0,0,0,903,904,5,69,0,0,904,
  	905,3,166,83,0,905,961,1,0,0,0,906,912,3,166,83,0,907,909,5,133,0,0,908,
  	910,3,120,60,0,909,908,1,0,0,0,909,910,1,0,0,0,910,911,1,0,0,0,911,913,
  	5,153,0,0,912,907,1,0,0,0,912,913,1,0,0,0,913,914,1,0,0,0,914,916,5,133,
  	0,0,915,917,5,24,0,0,916,915,1,0,0,0,916,917,1,0,0,0,917,919,1,0,0,0,
  	918,920,3,120,60,0,919,918,1,0,0,0,919,920,1,0,0,0,920,921,1,0,0,0,921,
  	922,5,153,0,0,922,961,1,0,0,0,923,961,3,130,65,0,924,961,3,174,87,0,925,
  	961,3,156,78,0,926,927,5,121,0,0,927,961,3,122,61,20,928,929,5,61,0,0,
  	929,961,3,122,61,14,930,931,3,146,73,0,931,932,5,123,0,0,932,934,1,0,
  	0,0,933,930,1,0,0,0,933,934,1,0,0,0,934,935,1,0,0,0,935,961,5,115,0,0,
  	936,937,5,133,0,0,937,938,3,48,24,0,938,939,5,153,0,0,939,961,1,0,0,0,
  	940,941,5,133,0,0,941,942,3,122,61,0,942,943,5,153,0,0,943,961,1,0,0,
  	0,944,945,5,133,0,0,945,946,3,120,60,0,946,947,5,153,0,0,947,961,1,0,
  	0,0,948,950,5,132,0,0,949,951,3,120,60,0,950,949,1,0,0,0,950,951,1,0,
  	0,0,951,952,1,0,0,0,952,961,5,152,0,0,953,955,5,131,0,0,954,956,3,40,
  	20,0,955,954,1,0,0,0,955,956,1,0,0,0,956,957,1,0,0,0,957,961,5,151,0,
  	0,958,961,3,124,62,0,959,961,3,138,69,0,960,808,1,0,0,0,960,828,1,0,0,
  	0,960,835,1,0,0,0,960,837,1,0,0,0,960,839,1,0,0,0,960,843,1,0,0,0,960,
  	854,1,0,0,0,960,856,1,0,0,0,960,864,1,0,0,0,960,886,1,0,0,0,960,906,1,
  	0,0,0,960,923,1,0,0,0,960,924,1,0,0,0,960,925,1,0,0,0,960,926,1,0,0,0,
  	960,928,1,0,0,0,960,933,1,0,0,0,960,936,1,0,0,0,960,940,1,0,0,0,960,944,
  	1,0,0,0,960,948,1,0,0,0,960,953,1,0,0,0,960,958,1,0,0,0,960,959,1,0,0,
  	0,961,1077,1,0,0,0,962,966,10,19,0,0,963,967,5,115,0,0,964,967,5,155,
  	0,0,965,967,5,142,0,0,966,963,1,0,0,0,966,964,1,0,0,0,966,965,1,0,0,0,
  	967,968,1,0,0,0,968,1076,3,122,61,20,969,973,10,18,0,0,970,974,5,143,
  	0,0,971,974,5,121,0,0,972,974,5,120,0,0,973,970,1,0,0,0,973,971,1,0,0,
  	0,973,972,1,0,0,0,974,975,1,0,0,0,975,1076,3,122,61,19,976,1001,10,17,
  	0,0,977,1002,5,124,0,0,978,1002,5,125,0,0,979,1002,5,137,0,0,980,1002,
  	5,134,0,0,981,1002,5,135,0,0,982,1002,5,126,0,0,983,1002,5,127,0,0,984,
  	986,5,61,0,0,985,984,1,0,0,0,985,986,1,0,0,0,986,987,1,0,0,0,987,989,
  	5,44,0,0,988,990,5,15,0,0,989,988,1,0,0,0,989,990,1,0,0,0,990,1002,1,
  	0,0,0,991,993,5,61,0,0,992,991,1,0,0,0,992,993,1,0,0,0,993,994,1,0,0,
  	0,994,1002,7,12,0,0,995,1002,5,149,0,0,996,1002,5,150,0,0,997,1002,5,
  	139,0,0,998,1002,5,129,0,0,999,1002,5,130,0,0,1000,1002,5,138,0,0,1001,
  	977,1,0,0,0,1001,978,1,0,0,0,1001,979,1,0,0,0,1001,980,1,0,0,0,1001,981,
  	1,0,0,0,1001,982,1,0,0,0,1001,983,1,0,0,0,1001,985,1,0,0,0,1001,992,1,
  	0,0,0,1001,995,1,0,0,0,1001,996,1,0,0,0,1001,997,1,0,0,0,1001,998,1,0,
  	0,0,1001,999,1,0,0,0,1001,1000,1,0,0,0,1002,1003,1,0,0,0,1003,1076,3,
  	122,61,18,1004,1005,10,15,0,0,1005,1006,5,141,0,0,1006,1076,3,122,61,
  	16,1007,1008,10,13,0,0,1008,1009,5,2,0,0,1009,1076,3,122,61,14,1010,1011,
  	10,12,0,0,1011,1012,5,66,0,0,1012,1076,3,122,61,13,1013,1015,10,11,0,
  	0,1014,1016,5,61,0,0,1015,1014,1,0,0,0,1015,1016,1,0,0,0,1016,1017,1,
  	0,0,0,1017,1018,5,9,0,0,1018,1019,3,122,61,0,1019,1020,5,2,0,0,1020,1021,
  	3,122,61,12,1021,1076,1,0,0,0,1022,1023,10,10,0,0,1023,1024,5,144,0,0,
  	1024,1025,3,122,61,0,1025,1026,5,118,0,0,1026,1027,3,122,61,10,1027,1076,
  	1,0,0,0,1028,1029,10,31,0,0,1029,1030,5,133,0,0,1030,1031,3,48,24,0,1031,
  	1032,5,153,0,0,1032,1076,1,0,0,0,1033,1034,10,30,0,0,1034,1036,5,133,
  	0,0,1035,1037,3,120,60,0,1036,1035,1,0,0,0,1036,1037,1,0,0,0,1037,1038,
  	1,0,0,0,1038,1076,5,153,0,0,1039,1040,10,26,0,0,1040,1041,5,132,0,0,1041,
  	1042,3,122,61,0,1042,1043,5,152,0,0,1043,1076,1,0,0,0,1044,1045,10,25,
  	0,0,1045,1046,5,123,0,0,1046,1076,5,111,0,0,1047,1048,10,24,0,0,1048,
  	1049,5,123,0,0,1049,1076,3,166,83,0,1050,1051,10,23,0,0,1051,1052,5,140,
  	0,0,1052,1053,5,132,0,0,1053,1054,3,122,61,0,1054,1055,5,152,0,0,1055,
  	1076,1,0,0,0,1056,1057,10,22,0,0,1057,1058,5,140,0,0,1058,1076,5,111,
  	0,0,1059,1060,10,21,0,0,1060,1061,5,140,0,0,1061,1076,3,166,83,0,1062,
  	1063,10,16,0,0,1063,1065,5,49,0,0,1064,1066,5,61,0,0,1065,1064,1,0,0,
  	0,1065,1066,1,0,0,0,1066,1067,1,0,0,0,1067,1076,5,62,0,0,1068,1073,10,
  	9,0,0,1069,1070,5,6,0,0,1070,1074,3,166,83,0,1071,1072,5,6,0,0,1072,1074,
  	5,113,0,0,1073,1069,1,0,0,0,1073,1071,1,0,0,0,1074,1076,1,0,0,0,1075,
  	962,1,0,0,0,1075,969,1,0,0,0,1075,976,1,0,0,0,1075,1004,1,0,0,0,1075,
  	1007,1,0,0,0,1075,1010,1,0,0,0,1075,1013,1,0,0,0,1075,1022,1,0,0,0,1075,
  	1028,1,0,0,0,1075,1033,1,0,0,0,1075,1039,1,0,0,0,1075,1044,1,0,0,0,1075,
  	1047,1,0,0,0,1075,1050,1,0,0,0,1075,1056,1,0,0,0,1075,1059,1,0,0,0,1075,
  	1062,1,0,0,0,1075,1068,1,0,0,0,1076,1079,1,0,0,0,1077,1075,1,0,0,0,1077,
  	1078,1,0,0,0,1078,123,1,0,0,0,1079,1077,1,0,0,0,1080,1081,5,133,0,0,1081,
  	1086,3,166,83,0,1082,1083,5,119,0,0,1083,1085,3,166,83,0,1084,1082,1,
  	0,0,0,1085,1088,1,0,0,0,1086,1084,1,0,0,0,1086,1087,1,0,0,0,1087,1090,
  	1,0,0,0,1088,1086,1,0,0,0,1089,1091,5,119,0,0,1090,1089,1,0,0,0,1090,
  	1091,1,0,0,0,1091,1092,1,0,0,0,1092,1093,5,153,0,0,1093,1108,1,0,0,0,
  	1094,1099,3,166,83,0,1095,1096,5,119,0,0,1096,1098,3,166,83,0,1097,1095,
  	1,0,0,0,1098,1101,1,0,0,0,1099,1097,1,0,0,0,1099,1100,1,0,0,0,1100,1103,
  	1,0,0,0,1101,1099,1,0,0,0,1102,1104,5,119,0,0,1103,1102,1,0,0,0,1103,
  	1104,1,0,0,0,1104,1108,1,0,0,0,1105,1106,5,133,0,0,1106,1108,5,153,0,
  	0,1107,1080,1,0,0,0,1107,1094,1,0,0,0,1107,1105,1,0,0,0,1108,1109,1,0,
  	0,0,1109,1112,5,114,0,0,1110,1113,3,122,61,0,1111,1113,3,36,18,0,1112,
  	1110,1,0,0,0,1112,1111,1,0,0,0,1113,125,1,0,0,0,1114,1121,3,130,65,0,
  	1115,1121,3,128,64,0,1116,1117,5,131,0,0,1117,1118,3,122,61,0,1118,1119,
  	5,151,0,0,1119,1121,1,0,0,0,1120,1114,1,0,0,0,1120,1115,1,0,0,0,1120,
  	1116,1,0,0,0,1121,127,1,0,0,0,1122,1123,5,167,0,0,1123,129,1,0,0,0,1124,
  	1125,5,135,0,0,1125,1129,3,166,83,0,1126,1128,3,132,66,0,1127,1126,1,
  	0,0,0,1128,1131,1,0,0,0,1129,1127,1,0,0,0,1129,1130,1,0,0,0,1130,1132,
  	1,0,0,0,1131,1129,1,0,0,0,1132,1133,5,156,0,0,1133,1154,1,0,0,0,1134,
  	1135,5,135,0,0,1135,1139,3,166,83,0,1136,1138,3,132,66,0,1137,1136,1,
  	0,0,0,1138,1141,1,0,0,0,1139,1137,1,0,0,0,1139,1140,1,0,0,0,1140,1142,
  	1,0,0,0,1141,1139,1,0,0,0,1142,1146,5,127,0,0,1143,1145,3,126,63,0,1144,
  	1143,1,0,0,0,1145,1148,1,0,0,0,1146,1144,1,0,0,0,1146,1147,1,0,0,0,1147,
  	1149,1,0,0,0,1148,1146,1,0,0,0,1149,1150,5,136,0,0,1150,1151,3,166,83,
  	0,1151,1152,5,127,0,0,1152,1154,1,0,0,0,1153,1124,1,0,0,0,1153,1134,1,
  	0,0,0,1154,131,1,0,0,0,1155,1156,3,166,83,0,1156,1157,5,125,0,0,1157,
  	1158,3,172,86,0,1158,1167,1,0,0,0,1159,1160,3,166,83,0,1160,1161,5,125,
  	0,0,1161,1162,5,131,0,0,1162,1163,3,122,61,0,1163,1164,5,151,0,0,1164,
  	1167,1,0,0,0,1165,1167,3,166,83,0,1166,1155,1,0,0,0,1166,1159,1,0,0,0,
  	1166,1165,1,0,0,0,1167,133,1,0,0,0,1168,1173,3,136,68,0,1169,1170,5,119,
  	0,0,1170,1172,3,136,68,0,1171,1169,1,0,0,0,1172,1175,1,0,0,0,1173,1171,
  	1,0,0,0,1173,1174,1,0,0,0,1174,1177,1,0,0,0,1175,1173,1,0,0,0,1176,1178,
  	5,119,0,0,1177,1176,1,0,0,0,1177,1178,1,0,0,0,1178,135,1,0,0,0,1179,1180,
  	3,166,83,0,1180,1181,5,6,0,0,1181,1182,5,133,0,0,1182,1183,3,48,24,0,
  	1183,1184,5,153,0,0,1184,1190,1,0,0,0,1185,1186,3,122,61,0,1186,1187,
  	5,6,0,0,1187,1188,3,166,83,0,1188,1190,1,0,0,0,1189,1179,1,0,0,0,1189,
  	1185,1,0,0,0,1190,137,1,0,0,0,1191,1199,3,170,85,0,1192,1193,3,146,73,
  	0,1193,1194,5,123,0,0,1194,1196,1,0,0,0,1195,1192,1,0,0,0,1195,1196,1,
  	0,0,0,1196,1197,1,0,0,0,1197,1199,3,140,70,0,1198,1191,1,0,0,0,1198,1195,
  	1,0,0,0,1199,139,1,0,0,0,1200,1205,3,166,83,0,1201,1202,5,123,0,0,1202,
  	1204,3,166,83,0,1203,1201,1,0,0,0,1204,1207,1,0,0,0,1205,1203,1,0,0,0,
  	1205,1206,1,0,0,0,1206,141,1,0,0,0,1207,1205,1,0,0,0,1208,1209,6,71,-1,
  	0,1209,1218,3,146,73,0,1210,1218,3,144,72,0,1211,1212,5,133,0,0,1212,
  	1213,3,48,24,0,1213,1214,5,153,0,0,1214,1218,1,0,0,0,1215,1218,3,130,
  	65,0,1216,1218,3,170,85,0,1217,1208,1,0,0,0,1217,1210,1,0,0,0,1217,1211,
  	1,0,0,0,1217,1215,1,0,0,0,1217,1216,1,0,0,0,1218,1227,1,0,0,0,1219,1223,
  	10,3,0,0,1220,1224,3,164,82,0,1221,1222,5,6,0,0,1222,1224,3,166,83,0,
  	1223,1220,1,0,0,0,1223,1221,1,0,0,0,1224,1226,1,0,0,0,1225,1219,1,0,0,
  	0,1226,1229,1,0,0,0,1227,1225,1,0,0,0,1227,1228,1,0,0,0,1228,143,1,0,
  	0,0,1229,1227,1,0,0,0,1230,1231,3,166,83,0,1231,1233,5,133,0,0,1232,1234,
  	3,148,74,0,1233,1232,1,0,0,0,1233,1234,1,0,0,0,1234,1235,1,0,0,0,1235,
  	1236,5,153,0,0,1236,145,1,0,0,0,1237,1238,3,150,75,0,1238,1239,5,123,
  	0,0,1239,1241,1,0,0,0,1240,1237,1,0,0,0,1240,1241,1,0,0,0,1241,1242,1,
  	0,0,0,1242,1243,3,140,70,0,1243,147,1,0,0,0,1244,1249,3,122,61,0,1245,
  	1246,5,119,0,0,1246,1248,3,122,61,0,1247,1245,1,0,0,0,1248,1251,1,0,0,
  	0,1249,1247,1,0,0,0,1249,1250,1,0,0,0,1250,1253,1,0,0,0,1251,1249,1,0,
  	0,0,1252,1254,5,119,0,0,1253,1252,1,0,0,0,1253,1254,1,0,0,0,1254,149,
  	1,0,0,0,1255,1256,3,166,83,0,1256,151,1,0,0,0,1257,1266,5,109,0,0,1258,
  	1259,5,123,0,0,1259,1266,7,13,0,0,1260,1261,5,111,0,0,1261,1263,5,123,
  	0,0,1262,1264,7,13,0,0,1263,1262,1,0,0,0,1263,1264,1,0,0,0,1264,1266,
  	1,0,0,0,1265,1257,1,0,0,0,1265,1258,1,0,0,0,1265,1260,1,0,0,0,1266,153,
  	1,0,0,0,1267,1269,7,14,0,0,1268,1267,1,0,0,0,1268,1269,1,0,0,0,1269,1276,
  	1,0,0,0,1270,1277,3,152,76,0,1271,1277,5,110,0,0,1272,1277,5,111,0,0,
  	1273,1277,5,112,0,0,1274,1277,5,45,0,0,1275,1277,5,60,0,0,1276,1270,1,
  	0,0,0,1276,1271,1,0,0,0,1276,1272,1,0,0,0,1276,1273,1,0,0,0,1276,1274,
  	1,0,0,0,1276,1275,1,0,0,0,1277,155,1,0,0,0,1278,1282,3,154,77,0,1279,
  	1282,5,113,0,0,1280,1282,5,62,0,0,1281,1278,1,0,0,0,1281,1279,1,0,0,0,
  	1281,1280,1,0,0,0,1282,157,1,0,0,0,1283,1284,7,15,0,0,1284,159,1,0,0,
  	0,1285,1286,7,16,0,0,1286,161,1,0,0,0,1287,1288,7,17,0,0,1288,163,1,0,
  	0,0,1289,1292,5,108,0,0,1290,1292,3,162,81,0,1291,1289,1,0,0,0,1291,1290,
  	1,0,0,0,1292,165,1,0,0,0,1293,1297,5,108,0,0,1294,1297,3,158,79,0,1295,
  	1297,3,160,80,0,1296,1293,1,0,0,0,1296,1294,1,0,0,0,1296,1295,1,0,0,0,
  	1297,167,1,0,0,0,1298,1299,3,172,86,0,1299,1300,5,125,0,0,1300,1301,3,
  	154,77,0,1301,169,1,0,0,0,1302,1303,5,131,0,0,1303,1304,3,122,61,0,1304,
  	1305,5,151,0,0,1305,171,1,0,0,0,1306,1309,5,113,0,0,1307,1309,3,174,87,
  	0,1308,1306,1,0,0,0,1308,1307,1,0,0,0,1309,173,1,0,0,0,1310,1314,5,146,
  	0,0,1311,1313,3,176,88,0,1312,1311,1,0,0,0,1313,1316,1,0,0,0,1314,1312,
  	1,0,0,0,1314,1315,1,0,0,0,1315,1317,1,0,0,0,1316,1314,1,0,0,0,1317,1318,
  	5,148,0,0,1318,175,1,0,0,0,1319,1320,5,162,0,0,1320,1321,3,122,61,0,1321,
  	1322,5,151,0,0,1322,1325,1,0,0,0,1323,1325,5,161,0,0,1324,1319,1,0,0,
  	0,1324,1323,1,0,0,0,1325,177,1,0,0,0,1326,1330,5,147,0,0,1327,1329,3,
  	180,90,0,1328,1327,1,0,0,0,1329,1332,1,0,0,0,1330,1328,1,0,0,0,1330,1331,
  	1,0,0,0,1331,1333,1,0,0,0,1332,1330,1,0,0,0,1333,1334,5,0,0,1,1334,179,
  	1,0,0,0,1335,1336,5,164,0,0,1336,1337,3,122,61,0,1337,1338,5,151,0,0,
  	1338,1341,1,0,0,0,1339,1341,5,163,0,0,1340,1335,1,0,0,0,1340,1339,1,0,
  	0,0,1341,181,1,0,0,0,171,185,192,201,208,212,226,230,233,237,240,247,
  	251,260,265,274,282,289,293,299,304,312,319,325,337,345,359,363,368,371,
  	381,391,399,403,407,410,414,417,420,423,426,430,434,437,440,443,446,450,
  	453,462,468,489,506,528,532,538,543,554,557,563,571,577,579,583,588,591,
  	594,598,602,605,607,610,614,618,621,623,625,630,641,647,652,659,664,668,
  	672,678,680,687,695,698,701,720,734,750,754,765,769,780,784,791,795,802,
  	806,811,820,824,850,867,873,876,879,889,895,898,901,909,912,916,919,933,
  	950,955,960,966,973,985,989,992,1001,1015,1036,1065,1073,1075,1077,1086,
  	1090,1099,1103,1107,1112,1120,1129,1139,1146,1153,1166,1173,1177,1189,
  	1195,1198,1205,1217,1223,1227,1233,1240,1249,1253,1263,1265,1268,1276,
  	1281,1291,1296,1308,1314,1324,1330,1340
  };
  staticData->serializedATN = antlr4::atn::SerializedATNView(serializedATNSegment, sizeof(serializedATNSegment) / sizeof(serializedATNSegment[0]));

  antlr4::atn::ATNDeserializer deserializer;
  staticData->atn = deserializer.deserialize(staticData->serializedATN);

  const size_t count = staticData->atn->getNumberOfDecisions();
  staticData->decisionToDFA.reserve(count);
  for (size_t i = 0; i < count; i++) { 
    staticData->decisionToDFA.emplace_back(staticData->atn->getDecisionState(i), i);
  }
  hogqlparserParserStaticData = std::move(staticData);
}

}

HogQLParser::HogQLParser(TokenStream *input) : HogQLParser(input, antlr4::atn::ParserATNSimulatorOptions()) {}

HogQLParser::HogQLParser(TokenStream *input, const antlr4::atn::ParserATNSimulatorOptions &options) : Parser(input) {
  HogQLParser::initialize();
  _interpreter = new atn::ParserATNSimulator(this, *hogqlparserParserStaticData->atn, hogqlparserParserStaticData->decisionToDFA, hogqlparserParserStaticData->sharedContextCache, options);
}

HogQLParser::~HogQLParser() {
  delete _interpreter;
}

const atn::ATN& HogQLParser::getATN() const {
  return *hogqlparserParserStaticData->atn;
}

std::string HogQLParser::getGrammarFileName() const {
  return "HogQLParser.g4";
}

const std::vector<std::string>& HogQLParser::getRuleNames() const {
  return hogqlparserParserStaticData->ruleNames;
}

const dfa::Vocabulary& HogQLParser::getVocabulary() const {
  return hogqlparserParserStaticData->vocabulary;
}

antlr4::atn::SerializedATNView HogQLParser::getSerializedATN() const {
  return hogqlparserParserStaticData->serializedATN;
}


//----------------- ProgramContext ------------------------------------------------------------------

HogQLParser::ProgramContext::ProgramContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

tree::TerminalNode* HogQLParser::ProgramContext::EOF() {
  return getToken(HogQLParser::EOF, 0);
}

std::vector<HogQLParser::DeclarationContext *> HogQLParser::ProgramContext::declaration() {
  return getRuleContexts<HogQLParser::DeclarationContext>();
}

HogQLParser::DeclarationContext* HogQLParser::ProgramContext::declaration(size_t i) {
  return getRuleContext<HogQLParser::DeclarationContext>(i);
}


size_t HogQLParser::ProgramContext::getRuleIndex() const {
  return HogQLParser::RuleProgram;
}


std::any HogQLParser::ProgramContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
    return parserVisitor->visitProgram(this);
  else
    return visitor->visitChildren(this);
}

HogQLParser::ProgramContext* HogQLParser::program() {
  ProgramContext *_localctx = _tracker.createInstance<ProgramContext>(_ctx, getState());
  enterRule(_localctx, 0, HogQLParser::RuleProgram);
  size_t _la = 0;

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(185);
    _errHandler->sync(this);
    _la = _input->LA(1);
    while ((((_la & ~ 0x3fULL) == 0) &&
      ((1ULL << _la) & -140738696331266) != 0) || ((((_la - 64) & ~ 0x3fULL) == 0) &&
      ((1ULL << (_la - 64)) & 723944844006785023) != 0) || ((((_la - 131) & ~ 0x3fULL) == 0) &&
      ((1ULL << (_la - 131)) & 8425495) != 0)) {
      setState(182);
      declaration();
      setState(187);
      _errHandler->sync(this);
      _la = _input->LA(1);
    }
    setState(188);
    match(HogQLParser::EOF);
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- DeclarationContext ------------------------------------------------------------------

HogQLParser::DeclarationContext::DeclarationContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

HogQLParser::VarDeclContext* HogQLParser::DeclarationContext::varDecl() {
  return getRuleContext<HogQLParser::VarDeclContext>(0);
}

HogQLParser::StatementContext* HogQLParser::DeclarationContext::statement() {
  return getRuleContext<HogQLParser::StatementContext>(0);
}


size_t HogQLParser::DeclarationContext::getRuleIndex() const {
  return HogQLParser::RuleDeclaration;
}


std::any HogQLParser::DeclarationContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
    return parserVisitor->visitDeclaration(this);
  else
    return visitor->visitChildren(this);
}

HogQLParser::DeclarationContext* HogQLParser::declaration() {
  DeclarationContext *_localctx = _tracker.createInstance<DeclarationContext>(_ctx, getState());
  enterRule(_localctx, 2, HogQLParser::RuleDeclaration);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    setState(192);
    _errHandler->sync(this);
    switch (_input->LA(1)) {
      case HogQLParser::LET: {
        enterOuterAlt(_localctx, 1);
        setState(190);
        varDecl();
        break;
      }

      case HogQLParser::ALL:
      case HogQLParser::AND:
      case HogQLParser::ANTI:
      case HogQLParser::ANY:
      case HogQLParser::ARRAY:
      case HogQLParser::AS:
      case HogQLParser::ASCENDING:
      case HogQLParser::ASOF:
      case HogQLParser::BETWEEN:
      case HogQLParser::BOTH:
      case HogQLParser::BY:
      case HogQLParser::CASE:
      case HogQLParser::CAST:
      case HogQLParser::COHORT:
      case HogQLParser::COLLATE:
      case HogQLParser::CROSS:
      case HogQLParser::CUBE:
      case HogQLParser::CURRENT:
      case HogQLParser::DATE:
      case HogQLParser::DAY:
      case HogQLParser::DESC:
      case HogQLParser::DESCENDING:
      case HogQLParser::DISTINCT:
      case HogQLParser::ELSE:
      case HogQLParser::END:
      case HogQLParser::EXTRACT:
      case HogQLParser::FINAL:
      case HogQLParser::FIRST:
      case HogQLParser::FN:
      case HogQLParser::FOLLOWING:
      case HogQLParser::FOR:
      case HogQLParser::FROM:
      case HogQLParser::FULL:
      case HogQLParser::FUN:
      case HogQLParser::GROUP:
      case HogQLParser::HAVING:
      case HogQLParser::HOUR:
      case HogQLParser::ID:
      case HogQLParser::IF:
      case HogQLParser::ILIKE:
      case HogQLParser::IN:
      case HogQLParser::INF:
      case HogQLParser::INNER:
      case HogQLParser::INTERVAL:
      case HogQLParser::IS:
      case HogQLParser::JOIN:
      case HogQLParser::KEY:
      case HogQLParser::LAST:
      case HogQLParser::LEADING:
      case HogQLParser::LEFT:
      case HogQLParser::LIKE:
      case HogQLParser::LIMIT:
      case HogQLParser::MINUTE:
      case HogQLParser::MONTH:
      case HogQLParser::NAN_SQL:
      case HogQLParser::NOT:
      case HogQLParser::NULL_SQL:
      case HogQLParser::NULLS:
      case HogQLParser::OFFSET:
      case HogQLParser::ON:
      case HogQLParser::OR:
      case HogQLParser::ORDER:
      case HogQLParser::OUTER:
      case HogQLParser::OVER:
      case HogQLParser::PARTITION:
      case HogQLParser::PRECEDING:
      case HogQLParser::PREWHERE:
      case HogQLParser::QUARTER:
      case HogQLParser::RANGE:
      case HogQLParser::RETURN:
      case HogQLParser::RIGHT:
      case HogQLParser::ROLLUP:
      case HogQLParser::ROW:
      case HogQLParser::ROWS:
      case HogQLParser::SAMPLE:
      case HogQLParser::SECOND:
      case HogQLParser::SELECT:
      case HogQLParser::SEMI:
      case HogQLParser::SETTINGS:
      case HogQLParser::SUBSTRING:
      case HogQLParser::THEN:
      case HogQLParser::THROW:
      case HogQLParser::TIES:
      case HogQLParser::TIMESTAMP:
      case HogQLParser::TO:
      case HogQLParser::TOP:
      case HogQLParser::TOTALS:
      case HogQLParser::TRAILING:
      case HogQLParser::TRIM:
      case HogQLParser::TRUNCATE:
      case HogQLParser::TRY:
      case HogQLParser::UNBOUNDED:
      case HogQLParser::UNION:
      case HogQLParser::USING:
      case HogQLParser::WEEK:
      case HogQLParser::WHEN:
      case HogQLParser::WHERE:
      case HogQLParser::WHILE:
      case HogQLParser::WINDOW:
      case HogQLParser::WITH:
      case HogQLParser::YEAR:
      case HogQLParser::IDENTIFIER:
      case HogQLParser::FLOATING_LITERAL:
      case HogQLParser::OCTAL_LITERAL:
      case HogQLParser::DECIMAL_LITERAL:
      case HogQLParser::HEXADECIMAL_LITERAL:
      case HogQLParser::STRING_LITERAL:
      case HogQLParser::ASTERISK:
      case HogQLParser::DASH:
      case HogQLParser::DOT:
      case HogQLParser::LBRACE:
      case HogQLParser::LBRACKET:
      case HogQLParser::LPAREN:
      case HogQLParser::LT:
      case HogQLParser::PLUS:
      case HogQLParser::QUOTE_SINGLE_TEMPLATE:
      case HogQLParser::SEMICOLON: {
        enterOuterAlt(_localctx, 2);
        setState(191);
        statement();
        break;
      }

    default:
      throw NoViableAltException(this);
    }
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- ExpressionContext ------------------------------------------------------------------

HogQLParser::ExpressionContext::ExpressionContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

HogQLParser::ColumnExprContext* HogQLParser::ExpressionContext::columnExpr() {
  return getRuleContext<HogQLParser::ColumnExprContext>(0);
}


size_t HogQLParser::ExpressionContext::getRuleIndex() const {
  return HogQLParser::RuleExpression;
}


std::any HogQLParser::ExpressionContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
    return parserVisitor->visitExpression(this);
  else
    return visitor->visitChildren(this);
}

HogQLParser::ExpressionContext* HogQLParser::expression() {
  ExpressionContext *_localctx = _tracker.createInstance<ExpressionContext>(_ctx, getState());
  enterRule(_localctx, 4, HogQLParser::RuleExpression);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(194);
    columnExpr(0);
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- VarDeclContext ------------------------------------------------------------------

HogQLParser::VarDeclContext::VarDeclContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

tree::TerminalNode* HogQLParser::VarDeclContext::LET() {
  return getToken(HogQLParser::LET, 0);
}

HogQLParser::IdentifierContext* HogQLParser::VarDeclContext::identifier() {
  return getRuleContext<HogQLParser::IdentifierContext>(0);
}

tree::TerminalNode* HogQLParser::VarDeclContext::COLON() {
  return getToken(HogQLParser::COLON, 0);
}

tree::TerminalNode* HogQLParser::VarDeclContext::EQ_SINGLE() {
  return getToken(HogQLParser::EQ_SINGLE, 0);
}

HogQLParser::ExpressionContext* HogQLParser::VarDeclContext::expression() {
  return getRuleContext<HogQLParser::ExpressionContext>(0);
}


size_t HogQLParser::VarDeclContext::getRuleIndex() const {
  return HogQLParser::RuleVarDecl;
}


std::any HogQLParser::VarDeclContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
    return parserVisitor->visitVarDecl(this);
  else
    return visitor->visitChildren(this);
}

HogQLParser::VarDeclContext* HogQLParser::varDecl() {
  VarDeclContext *_localctx = _tracker.createInstance<VarDeclContext>(_ctx, getState());
  enterRule(_localctx, 6, HogQLParser::RuleVarDecl);
  size_t _la = 0;

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(196);
    match(HogQLParser::LET);
    setState(197);
    identifier();
    setState(201);
    _errHandler->sync(this);

    _la = _input->LA(1);
    if (_la == HogQLParser::COLON) {
      setState(198);
      match(HogQLParser::COLON);
      setState(199);
      match(HogQLParser::EQ_SINGLE);
      setState(200);
      expression();
    }
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- IdentifierListContext ------------------------------------------------------------------

HogQLParser::IdentifierListContext::IdentifierListContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

std::vector<HogQLParser::IdentifierContext *> HogQLParser::IdentifierListContext::identifier() {
  return getRuleContexts<HogQLParser::IdentifierContext>();
}

HogQLParser::IdentifierContext* HogQLParser::IdentifierListContext::identifier(size_t i) {
  return getRuleContext<HogQLParser::IdentifierContext>(i);
}

std::vector<tree::TerminalNode *> HogQLParser::IdentifierListContext::COMMA() {
  return getTokens(HogQLParser::COMMA);
}

tree::TerminalNode* HogQLParser::IdentifierListContext::COMMA(size_t i) {
  return getToken(HogQLParser::COMMA, i);
}


size_t HogQLParser::IdentifierListContext::getRuleIndex() const {
  return HogQLParser::RuleIdentifierList;
}


std::any HogQLParser::IdentifierListContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
    return parserVisitor->visitIdentifierList(this);
  else
    return visitor->visitChildren(this);
}

HogQLParser::IdentifierListContext* HogQLParser::identifierList() {
  IdentifierListContext *_localctx = _tracker.createInstance<IdentifierListContext>(_ctx, getState());
  enterRule(_localctx, 8, HogQLParser::RuleIdentifierList);
  size_t _la = 0;

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    size_t alt;
    enterOuterAlt(_localctx, 1);
    setState(203);
    identifier();
    setState(208);
    _errHandler->sync(this);
    alt = getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 3, _ctx);
    while (alt != 2 && alt != atn::ATN::INVALID_ALT_NUMBER) {
      if (alt == 1) {
        setState(204);
        match(HogQLParser::COMMA);
        setState(205);
        identifier(); 
      }
      setState(210);
      _errHandler->sync(this);
      alt = getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 3, _ctx);
    }
    setState(212);
    _errHandler->sync(this);

    _la = _input->LA(1);
    if (_la == HogQLParser::COMMA) {
      setState(211);
      match(HogQLParser::COMMA);
    }
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- StatementContext ------------------------------------------------------------------

HogQLParser::StatementContext::StatementContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

HogQLParser::ReturnStmtContext* HogQLParser::StatementContext::returnStmt() {
  return getRuleContext<HogQLParser::ReturnStmtContext>(0);
}

HogQLParser::ThrowStmtContext* HogQLParser::StatementContext::throwStmt() {
  return getRuleContext<HogQLParser::ThrowStmtContext>(0);
}

HogQLParser::TryCatchStmtContext* HogQLParser::StatementContext::tryCatchStmt() {
  return getRuleContext<HogQLParser::TryCatchStmtContext>(0);
}

HogQLParser::IfStmtContext* HogQLParser::StatementContext::ifStmt() {
  return getRuleContext<HogQLParser::IfStmtContext>(0);
}

HogQLParser::WhileStmtContext* HogQLParser::StatementContext::whileStmt() {
  return getRuleContext<HogQLParser::WhileStmtContext>(0);
}

HogQLParser::ForInStmtContext* HogQLParser::StatementContext::forInStmt() {
  return getRuleContext<HogQLParser::ForInStmtContext>(0);
}

HogQLParser::ForStmtContext* HogQLParser::StatementContext::forStmt() {
  return getRuleContext<HogQLParser::ForStmtContext>(0);
}

HogQLParser::FuncStmtContext* HogQLParser::StatementContext::funcStmt() {
  return getRuleContext<HogQLParser::FuncStmtContext>(0);
}

HogQLParser::VarAssignmentContext* HogQLParser::StatementContext::varAssignment() {
  return getRuleContext<HogQLParser::VarAssignmentContext>(0);
}

HogQLParser::BlockContext* HogQLParser::StatementContext::block() {
  return getRuleContext<HogQLParser::BlockContext>(0);
}

HogQLParser::ExprStmtContext* HogQLParser::StatementContext::exprStmt() {
  return getRuleContext<HogQLParser::ExprStmtContext>(0);
}

HogQLParser::EmptyStmtContext* HogQLParser::StatementContext::emptyStmt() {
  return getRuleContext<HogQLParser::EmptyStmtContext>(0);
}


size_t HogQLParser::StatementContext::getRuleIndex() const {
  return HogQLParser::RuleStatement;
}


std::any HogQLParser::StatementContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
    return parserVisitor->visitStatement(this);
  else
    return visitor->visitChildren(this);
}

HogQLParser::StatementContext* HogQLParser::statement() {
  StatementContext *_localctx = _tracker.createInstance<StatementContext>(_ctx, getState());
  enterRule(_localctx, 10, HogQLParser::RuleStatement);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    setState(226);
    _errHandler->sync(this);
    switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 5, _ctx)) {
    case 1: {
      enterOuterAlt(_localctx, 1);
      setState(214);
      returnStmt();
      break;
    }

    case 2: {
      enterOuterAlt(_localctx, 2);
      setState(215);
      throwStmt();
      break;
    }

    case 3: {
      enterOuterAlt(_localctx, 3);
      setState(216);
      tryCatchStmt();
      break;
    }

    case 4: {
      enterOuterAlt(_localctx, 4);
      setState(217);
      ifStmt();
      break;
    }

    case 5: {
      enterOuterAlt(_localctx, 5);
      setState(218);
      whileStmt();
      break;
    }

    case 6: {
      enterOuterAlt(_localctx, 6);
      setState(219);
      forInStmt();
      break;
    }

    case 7: {
      enterOuterAlt(_localctx, 7);
      setState(220);
      forStmt();
      break;
    }

    case 8: {
      enterOuterAlt(_localctx, 8);
      setState(221);
      funcStmt();
      break;
    }

    case 9: {
      enterOuterAlt(_localctx, 9);
      setState(222);
      varAssignment();
      break;
    }

    case 10: {
      enterOuterAlt(_localctx, 10);
      setState(223);
      block();
      break;
    }

    case 11: {
      enterOuterAlt(_localctx, 11);
      setState(224);
      exprStmt();
      break;
    }

    case 12: {
      enterOuterAlt(_localctx, 12);
      setState(225);
      emptyStmt();
      break;
    }

    default:
      break;
    }
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- ReturnStmtContext ------------------------------------------------------------------

HogQLParser::ReturnStmtContext::ReturnStmtContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

tree::TerminalNode* HogQLParser::ReturnStmtContext::RETURN() {
  return getToken(HogQLParser::RETURN, 0);
}

HogQLParser::ExpressionContext* HogQLParser::ReturnStmtContext::expression() {
  return getRuleContext<HogQLParser::ExpressionContext>(0);
}

tree::TerminalNode* HogQLParser::ReturnStmtContext::SEMICOLON() {
  return getToken(HogQLParser::SEMICOLON, 0);
}


size_t HogQLParser::ReturnStmtContext::getRuleIndex() const {
  return HogQLParser::RuleReturnStmt;
}


std::any HogQLParser::ReturnStmtContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
    return parserVisitor->visitReturnStmt(this);
  else
    return visitor->visitChildren(this);
}

HogQLParser::ReturnStmtContext* HogQLParser::returnStmt() {
  ReturnStmtContext *_localctx = _tracker.createInstance<ReturnStmtContext>(_ctx, getState());
  enterRule(_localctx, 12, HogQLParser::RuleReturnStmt);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(228);
    match(HogQLParser::RETURN);
    setState(230);
    _errHandler->sync(this);

    switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 6, _ctx)) {
    case 1: {
      setState(229);
      expression();
      break;
    }

    default:
      break;
    }
    setState(233);
    _errHandler->sync(this);

    switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 7, _ctx)) {
    case 1: {
      setState(232);
      match(HogQLParser::SEMICOLON);
      break;
    }

    default:
      break;
    }
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- ThrowStmtContext ------------------------------------------------------------------

HogQLParser::ThrowStmtContext::ThrowStmtContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

tree::TerminalNode* HogQLParser::ThrowStmtContext::THROW() {
  return getToken(HogQLParser::THROW, 0);
}

HogQLParser::ExpressionContext* HogQLParser::ThrowStmtContext::expression() {
  return getRuleContext<HogQLParser::ExpressionContext>(0);
}

tree::TerminalNode* HogQLParser::ThrowStmtContext::SEMICOLON() {
  return getToken(HogQLParser::SEMICOLON, 0);
}


size_t HogQLParser::ThrowStmtContext::getRuleIndex() const {
  return HogQLParser::RuleThrowStmt;
}


std::any HogQLParser::ThrowStmtContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
    return parserVisitor->visitThrowStmt(this);
  else
    return visitor->visitChildren(this);
}

HogQLParser::ThrowStmtContext* HogQLParser::throwStmt() {
  ThrowStmtContext *_localctx = _tracker.createInstance<ThrowStmtContext>(_ctx, getState());
  enterRule(_localctx, 14, HogQLParser::RuleThrowStmt);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(235);
    match(HogQLParser::THROW);
    setState(237);
    _errHandler->sync(this);

    switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 8, _ctx)) {
    case 1: {
      setState(236);
      expression();
      break;
    }

    default:
      break;
    }
    setState(240);
    _errHandler->sync(this);

    switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 9, _ctx)) {
    case 1: {
      setState(239);
      match(HogQLParser::SEMICOLON);
      break;
    }

    default:
      break;
    }
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- CatchBlockContext ------------------------------------------------------------------

HogQLParser::CatchBlockContext::CatchBlockContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

tree::TerminalNode* HogQLParser::CatchBlockContext::CATCH() {
  return getToken(HogQLParser::CATCH, 0);
}

HogQLParser::BlockContext* HogQLParser::CatchBlockContext::block() {
  return getRuleContext<HogQLParser::BlockContext>(0);
}

tree::TerminalNode* HogQLParser::CatchBlockContext::LPAREN() {
  return getToken(HogQLParser::LPAREN, 0);
}

tree::TerminalNode* HogQLParser::CatchBlockContext::RPAREN() {
  return getToken(HogQLParser::RPAREN, 0);
}

std::vector<HogQLParser::IdentifierContext *> HogQLParser::CatchBlockContext::identifier() {
  return getRuleContexts<HogQLParser::IdentifierContext>();
}

HogQLParser::IdentifierContext* HogQLParser::CatchBlockContext::identifier(size_t i) {
  return getRuleContext<HogQLParser::IdentifierContext>(i);
}

tree::TerminalNode* HogQLParser::CatchBlockContext::COLON() {
  return getToken(HogQLParser::COLON, 0);
}


size_t HogQLParser::CatchBlockContext::getRuleIndex() const {
  return HogQLParser::RuleCatchBlock;
}


std::any HogQLParser::CatchBlockContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
    return parserVisitor->visitCatchBlock(this);
  else
    return visitor->visitChildren(this);
}

HogQLParser::CatchBlockContext* HogQLParser::catchBlock() {
  CatchBlockContext *_localctx = _tracker.createInstance<CatchBlockContext>(_ctx, getState());
  enterRule(_localctx, 16, HogQLParser::RuleCatchBlock);
  size_t _la = 0;

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(242);
    match(HogQLParser::CATCH);
    setState(251);
    _errHandler->sync(this);

    _la = _input->LA(1);
    if (_la == HogQLParser::LPAREN) {
      setState(243);
      match(HogQLParser::LPAREN);
      setState(244);
      antlrcpp::downCast<CatchBlockContext *>(_localctx)->catchVar = identifier();
      setState(247);
      _errHandler->sync(this);

      _la = _input->LA(1);
      if (_la == HogQLParser::COLON) {
        setState(245);
        match(HogQLParser::COLON);
        setState(246);
        antlrcpp::downCast<CatchBlockContext *>(_localctx)->catchType = identifier();
      }
      setState(249);
      match(HogQLParser::RPAREN);
    }
    setState(253);
    antlrcpp::downCast<CatchBlockContext *>(_localctx)->catchStmt = block();
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- TryCatchStmtContext ------------------------------------------------------------------

HogQLParser::TryCatchStmtContext::TryCatchStmtContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

tree::TerminalNode* HogQLParser::TryCatchStmtContext::TRY() {
  return getToken(HogQLParser::TRY, 0);
}

std::vector<HogQLParser::BlockContext *> HogQLParser::TryCatchStmtContext::block() {
  return getRuleContexts<HogQLParser::BlockContext>();
}

HogQLParser::BlockContext* HogQLParser::TryCatchStmtContext::block(size_t i) {
  return getRuleContext<HogQLParser::BlockContext>(i);
}

std::vector<HogQLParser::CatchBlockContext *> HogQLParser::TryCatchStmtContext::catchBlock() {
  return getRuleContexts<HogQLParser::CatchBlockContext>();
}

HogQLParser::CatchBlockContext* HogQLParser::TryCatchStmtContext::catchBlock(size_t i) {
  return getRuleContext<HogQLParser::CatchBlockContext>(i);
}

tree::TerminalNode* HogQLParser::TryCatchStmtContext::FINALLY() {
  return getToken(HogQLParser::FINALLY, 0);
}


size_t HogQLParser::TryCatchStmtContext::getRuleIndex() const {
  return HogQLParser::RuleTryCatchStmt;
}


std::any HogQLParser::TryCatchStmtContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
    return parserVisitor->visitTryCatchStmt(this);
  else
    return visitor->visitChildren(this);
}

HogQLParser::TryCatchStmtContext* HogQLParser::tryCatchStmt() {
  TryCatchStmtContext *_localctx = _tracker.createInstance<TryCatchStmtContext>(_ctx, getState());
  enterRule(_localctx, 18, HogQLParser::RuleTryCatchStmt);
  size_t _la = 0;

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(255);
    match(HogQLParser::TRY);
    setState(256);
    antlrcpp::downCast<TryCatchStmtContext *>(_localctx)->tryStmt = block();
    setState(260);
    _errHandler->sync(this);
    _la = _input->LA(1);
    while (_la == HogQLParser::CATCH) {
      setState(257);
      catchBlock();
      setState(262);
      _errHandler->sync(this);
      _la = _input->LA(1);
    }
    setState(265);
    _errHandler->sync(this);

    _la = _input->LA(1);
    if (_la == HogQLParser::FINALLY) {
      setState(263);
      match(HogQLParser::FINALLY);
      setState(264);
      antlrcpp::downCast<TryCatchStmtContext *>(_localctx)->finallyStmt = block();
    }
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- IfStmtContext ------------------------------------------------------------------

HogQLParser::IfStmtContext::IfStmtContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

tree::TerminalNode* HogQLParser::IfStmtContext::IF() {
  return getToken(HogQLParser::IF, 0);
}

tree::TerminalNode* HogQLParser::IfStmtContext::LPAREN() {
  return getToken(HogQLParser::LPAREN, 0);
}

HogQLParser::ExpressionContext* HogQLParser::IfStmtContext::expression() {
  return getRuleContext<HogQLParser::ExpressionContext>(0);
}

tree::TerminalNode* HogQLParser::IfStmtContext::RPAREN() {
  return getToken(HogQLParser::RPAREN, 0);
}

std::vector<HogQLParser::StatementContext *> HogQLParser::IfStmtContext::statement() {
  return getRuleContexts<HogQLParser::StatementContext>();
}

HogQLParser::StatementContext* HogQLParser::IfStmtContext::statement(size_t i) {
  return getRuleContext<HogQLParser::StatementContext>(i);
}

tree::TerminalNode* HogQLParser::IfStmtContext::ELSE() {
  return getToken(HogQLParser::ELSE, 0);
}


size_t HogQLParser::IfStmtContext::getRuleIndex() const {
  return HogQLParser::RuleIfStmt;
}


std::any HogQLParser::IfStmtContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
    return parserVisitor->visitIfStmt(this);
  else
    return visitor->visitChildren(this);
}

HogQLParser::IfStmtContext* HogQLParser::ifStmt() {
  IfStmtContext *_localctx = _tracker.createInstance<IfStmtContext>(_ctx, getState());
  enterRule(_localctx, 20, HogQLParser::RuleIfStmt);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(267);
    match(HogQLParser::IF);
    setState(268);
    match(HogQLParser::LPAREN);
    setState(269);
    expression();
    setState(270);
    match(HogQLParser::RPAREN);
    setState(271);
    statement();
    setState(274);
    _errHandler->sync(this);

    switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 14, _ctx)) {
    case 1: {
      setState(272);
      match(HogQLParser::ELSE);
      setState(273);
      statement();
      break;
    }

    default:
      break;
    }
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- WhileStmtContext ------------------------------------------------------------------

HogQLParser::WhileStmtContext::WhileStmtContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

tree::TerminalNode* HogQLParser::WhileStmtContext::WHILE() {
  return getToken(HogQLParser::WHILE, 0);
}

tree::TerminalNode* HogQLParser::WhileStmtContext::LPAREN() {
  return getToken(HogQLParser::LPAREN, 0);
}

HogQLParser::ExpressionContext* HogQLParser::WhileStmtContext::expression() {
  return getRuleContext<HogQLParser::ExpressionContext>(0);
}

tree::TerminalNode* HogQLParser::WhileStmtContext::RPAREN() {
  return getToken(HogQLParser::RPAREN, 0);
}

HogQLParser::StatementContext* HogQLParser::WhileStmtContext::statement() {
  return getRuleContext<HogQLParser::StatementContext>(0);
}

tree::TerminalNode* HogQLParser::WhileStmtContext::SEMICOLON() {
  return getToken(HogQLParser::SEMICOLON, 0);
}


size_t HogQLParser::WhileStmtContext::getRuleIndex() const {
  return HogQLParser::RuleWhileStmt;
}


std::any HogQLParser::WhileStmtContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
    return parserVisitor->visitWhileStmt(this);
  else
    return visitor->visitChildren(this);
}

HogQLParser::WhileStmtContext* HogQLParser::whileStmt() {
  WhileStmtContext *_localctx = _tracker.createInstance<WhileStmtContext>(_ctx, getState());
  enterRule(_localctx, 22, HogQLParser::RuleWhileStmt);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(276);
    match(HogQLParser::WHILE);
    setState(277);
    match(HogQLParser::LPAREN);
    setState(278);
    expression();
    setState(279);
    match(HogQLParser::RPAREN);
    setState(280);
    statement();
    setState(282);
    _errHandler->sync(this);

    switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 15, _ctx)) {
    case 1: {
      setState(281);
      match(HogQLParser::SEMICOLON);
      break;
    }

    default:
      break;
    }
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- ForStmtContext ------------------------------------------------------------------

HogQLParser::ForStmtContext::ForStmtContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

tree::TerminalNode* HogQLParser::ForStmtContext::FOR() {
  return getToken(HogQLParser::FOR, 0);
}

tree::TerminalNode* HogQLParser::ForStmtContext::LPAREN() {
  return getToken(HogQLParser::LPAREN, 0);
}

std::vector<tree::TerminalNode *> HogQLParser::ForStmtContext::SEMICOLON() {
  return getTokens(HogQLParser::SEMICOLON);
}

tree::TerminalNode* HogQLParser::ForStmtContext::SEMICOLON(size_t i) {
  return getToken(HogQLParser::SEMICOLON, i);
}

tree::TerminalNode* HogQLParser::ForStmtContext::RPAREN() {
  return getToken(HogQLParser::RPAREN, 0);
}

HogQLParser::StatementContext* HogQLParser::ForStmtContext::statement() {
  return getRuleContext<HogQLParser::StatementContext>(0);
}

std::vector<HogQLParser::VarDeclContext *> HogQLParser::ForStmtContext::varDecl() {
  return getRuleContexts<HogQLParser::VarDeclContext>();
}

HogQLParser::VarDeclContext* HogQLParser::ForStmtContext::varDecl(size_t i) {
  return getRuleContext<HogQLParser::VarDeclContext>(i);
}

std::vector<HogQLParser::VarAssignmentContext *> HogQLParser::ForStmtContext::varAssignment() {
  return getRuleContexts<HogQLParser::VarAssignmentContext>();
}

HogQLParser::VarAssignmentContext* HogQLParser::ForStmtContext::varAssignment(size_t i) {
  return getRuleContext<HogQLParser::VarAssignmentContext>(i);
}

std::vector<HogQLParser::ExpressionContext *> HogQLParser::ForStmtContext::expression() {
  return getRuleContexts<HogQLParser::ExpressionContext>();
}

HogQLParser::ExpressionContext* HogQLParser::ForStmtContext::expression(size_t i) {
  return getRuleContext<HogQLParser::ExpressionContext>(i);
}


size_t HogQLParser::ForStmtContext::getRuleIndex() const {
  return HogQLParser::RuleForStmt;
}


std::any HogQLParser::ForStmtContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
    return parserVisitor->visitForStmt(this);
  else
    return visitor->visitChildren(this);
}

HogQLParser::ForStmtContext* HogQLParser::forStmt() {
  ForStmtContext *_localctx = _tracker.createInstance<ForStmtContext>(_ctx, getState());
  enterRule(_localctx, 24, HogQLParser::RuleForStmt);
  size_t _la = 0;

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(284);
    match(HogQLParser::FOR);
    setState(285);
    match(HogQLParser::LPAREN);
    setState(289);
    _errHandler->sync(this);

    switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 16, _ctx)) {
    case 1: {
      setState(286);
      antlrcpp::downCast<ForStmtContext *>(_localctx)->initializerVarDeclr = varDecl();
      break;
    }

    case 2: {
      setState(287);
      antlrcpp::downCast<ForStmtContext *>(_localctx)->initializerVarAssignment = varAssignment();
      break;
    }

    case 3: {
      setState(288);
      antlrcpp::downCast<ForStmtContext *>(_localctx)->initializerExpression = expression();
      break;
    }

    default:
      break;
    }
    setState(291);
    match(HogQLParser::SEMICOLON);
    setState(293);
    _errHandler->sync(this);

    _la = _input->LA(1);
    if ((((_la & ~ 0x3fULL) == 0) &&
      ((1ULL << _la) & -36169677449216002) != 0) || ((((_la - 64) & ~ 0x3fULL) == 0) &&
      ((1ULL << (_la - 64)) & 723944289947615231) != 0) || ((((_la - 131) & ~ 0x3fULL) == 0) &&
      ((1ULL << (_la - 131)) & 36887) != 0)) {
      setState(292);
      antlrcpp::downCast<ForStmtContext *>(_localctx)->condition = expression();
    }
    setState(295);
    match(HogQLParser::SEMICOLON);
    setState(299);
    _errHandler->sync(this);

    switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 18, _ctx)) {
    case 1: {
      setState(296);
      antlrcpp::downCast<ForStmtContext *>(_localctx)->incrementVarDeclr = varDecl();
      break;
    }

    case 2: {
      setState(297);
      antlrcpp::downCast<ForStmtContext *>(_localctx)->incrementVarAssignment = varAssignment();
      break;
    }

    case 3: {
      setState(298);
      antlrcpp::downCast<ForStmtContext *>(_localctx)->incrementExpression = expression();
      break;
    }

    default:
      break;
    }
    setState(301);
    match(HogQLParser::RPAREN);
    setState(302);
    statement();
    setState(304);
    _errHandler->sync(this);

    switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 19, _ctx)) {
    case 1: {
      setState(303);
      match(HogQLParser::SEMICOLON);
      break;
    }

    default:
      break;
    }
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- ForInStmtContext ------------------------------------------------------------------

HogQLParser::ForInStmtContext::ForInStmtContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

tree::TerminalNode* HogQLParser::ForInStmtContext::FOR() {
  return getToken(HogQLParser::FOR, 0);
}

tree::TerminalNode* HogQLParser::ForInStmtContext::LPAREN() {
  return getToken(HogQLParser::LPAREN, 0);
}

tree::TerminalNode* HogQLParser::ForInStmtContext::LET() {
  return getToken(HogQLParser::LET, 0);
}

std::vector<HogQLParser::IdentifierContext *> HogQLParser::ForInStmtContext::identifier() {
  return getRuleContexts<HogQLParser::IdentifierContext>();
}

HogQLParser::IdentifierContext* HogQLParser::ForInStmtContext::identifier(size_t i) {
  return getRuleContext<HogQLParser::IdentifierContext>(i);
}

tree::TerminalNode* HogQLParser::ForInStmtContext::IN() {
  return getToken(HogQLParser::IN, 0);
}

HogQLParser::ExpressionContext* HogQLParser::ForInStmtContext::expression() {
  return getRuleContext<HogQLParser::ExpressionContext>(0);
}

tree::TerminalNode* HogQLParser::ForInStmtContext::RPAREN() {
  return getToken(HogQLParser::RPAREN, 0);
}

HogQLParser::StatementContext* HogQLParser::ForInStmtContext::statement() {
  return getRuleContext<HogQLParser::StatementContext>(0);
}

tree::TerminalNode* HogQLParser::ForInStmtContext::COMMA() {
  return getToken(HogQLParser::COMMA, 0);
}

tree::TerminalNode* HogQLParser::ForInStmtContext::SEMICOLON() {
  return getToken(HogQLParser::SEMICOLON, 0);
}


size_t HogQLParser::ForInStmtContext::getRuleIndex() const {
  return HogQLParser::RuleForInStmt;
}


std::any HogQLParser::ForInStmtContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
    return parserVisitor->visitForInStmt(this);
  else
    return visitor->visitChildren(this);
}

HogQLParser::ForInStmtContext* HogQLParser::forInStmt() {
  ForInStmtContext *_localctx = _tracker.createInstance<ForInStmtContext>(_ctx, getState());
  enterRule(_localctx, 26, HogQLParser::RuleForInStmt);
  size_t _la = 0;

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(306);
    match(HogQLParser::FOR);
    setState(307);
    match(HogQLParser::LPAREN);
    setState(308);
    match(HogQLParser::LET);
    setState(309);
    identifier();
    setState(312);
    _errHandler->sync(this);

    _la = _input->LA(1);
    if (_la == HogQLParser::COMMA) {
      setState(310);
      match(HogQLParser::COMMA);
      setState(311);
      identifier();
    }
    setState(314);
    match(HogQLParser::IN);
    setState(315);
    expression();
    setState(316);
    match(HogQLParser::RPAREN);
    setState(317);
    statement();
    setState(319);
    _errHandler->sync(this);

    switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 21, _ctx)) {
    case 1: {
      setState(318);
      match(HogQLParser::SEMICOLON);
      break;
    }

    default:
      break;
    }
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- FuncStmtContext ------------------------------------------------------------------

HogQLParser::FuncStmtContext::FuncStmtContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

HogQLParser::IdentifierContext* HogQLParser::FuncStmtContext::identifier() {
  return getRuleContext<HogQLParser::IdentifierContext>(0);
}

tree::TerminalNode* HogQLParser::FuncStmtContext::LPAREN() {
  return getToken(HogQLParser::LPAREN, 0);
}

tree::TerminalNode* HogQLParser::FuncStmtContext::RPAREN() {
  return getToken(HogQLParser::RPAREN, 0);
}

HogQLParser::BlockContext* HogQLParser::FuncStmtContext::block() {
  return getRuleContext<HogQLParser::BlockContext>(0);
}

tree::TerminalNode* HogQLParser::FuncStmtContext::FN() {
  return getToken(HogQLParser::FN, 0);
}

tree::TerminalNode* HogQLParser::FuncStmtContext::FUN() {
  return getToken(HogQLParser::FUN, 0);
}

HogQLParser::IdentifierListContext* HogQLParser::FuncStmtContext::identifierList() {
  return getRuleContext<HogQLParser::IdentifierListContext>(0);
}


size_t HogQLParser::FuncStmtContext::getRuleIndex() const {
  return HogQLParser::RuleFuncStmt;
}


std::any HogQLParser::FuncStmtContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
    return parserVisitor->visitFuncStmt(this);
  else
    return visitor->visitChildren(this);
}

HogQLParser::FuncStmtContext* HogQLParser::funcStmt() {
  FuncStmtContext *_localctx = _tracker.createInstance<FuncStmtContext>(_ctx, getState());
  enterRule(_localctx, 28, HogQLParser::RuleFuncStmt);
  size_t _la = 0;

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(321);
    _la = _input->LA(1);
    if (!(_la == HogQLParser::FN

    || _la == HogQLParser::FUN)) {
    _errHandler->recoverInline(this);
    }
    else {
      _errHandler->reportMatch(this);
      consume();
    }
    setState(322);
    identifier();
    setState(323);
    match(HogQLParser::LPAREN);
    setState(325);
    _errHandler->sync(this);

    _la = _input->LA(1);
    if ((((_la & ~ 0x3fULL) == 0) &&
      ((1ULL << _la) & -5800812384855539714) != 0) || ((((_la - 64) & ~ 0x3fULL) == 0) &&
      ((1ULL << (_la - 64)) & 25834219896831) != 0)) {
      setState(324);
      identifierList();
    }
    setState(327);
    match(HogQLParser::RPAREN);
    setState(328);
    block();
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- VarAssignmentContext ------------------------------------------------------------------

HogQLParser::VarAssignmentContext::VarAssignmentContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

std::vector<HogQLParser::ExpressionContext *> HogQLParser::VarAssignmentContext::expression() {
  return getRuleContexts<HogQLParser::ExpressionContext>();
}

HogQLParser::ExpressionContext* HogQLParser::VarAssignmentContext::expression(size_t i) {
  return getRuleContext<HogQLParser::ExpressionContext>(i);
}

tree::TerminalNode* HogQLParser::VarAssignmentContext::COLON() {
  return getToken(HogQLParser::COLON, 0);
}

tree::TerminalNode* HogQLParser::VarAssignmentContext::EQ_SINGLE() {
  return getToken(HogQLParser::EQ_SINGLE, 0);
}


size_t HogQLParser::VarAssignmentContext::getRuleIndex() const {
  return HogQLParser::RuleVarAssignment;
}


std::any HogQLParser::VarAssignmentContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
    return parserVisitor->visitVarAssignment(this);
  else
    return visitor->visitChildren(this);
}

HogQLParser::VarAssignmentContext* HogQLParser::varAssignment() {
  VarAssignmentContext *_localctx = _tracker.createInstance<VarAssignmentContext>(_ctx, getState());
  enterRule(_localctx, 30, HogQLParser::RuleVarAssignment);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(330);
    expression();
    setState(331);
    match(HogQLParser::COLON);
    setState(332);
    match(HogQLParser::EQ_SINGLE);
    setState(333);
    expression();
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- ExprStmtContext ------------------------------------------------------------------

HogQLParser::ExprStmtContext::ExprStmtContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

HogQLParser::ExpressionContext* HogQLParser::ExprStmtContext::expression() {
  return getRuleContext<HogQLParser::ExpressionContext>(0);
}

tree::TerminalNode* HogQLParser::ExprStmtContext::SEMICOLON() {
  return getToken(HogQLParser::SEMICOLON, 0);
}


size_t HogQLParser::ExprStmtContext::getRuleIndex() const {
  return HogQLParser::RuleExprStmt;
}


std::any HogQLParser::ExprStmtContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
    return parserVisitor->visitExprStmt(this);
  else
    return visitor->visitChildren(this);
}

HogQLParser::ExprStmtContext* HogQLParser::exprStmt() {
  ExprStmtContext *_localctx = _tracker.createInstance<ExprStmtContext>(_ctx, getState());
  enterRule(_localctx, 32, HogQLParser::RuleExprStmt);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(335);
    expression();
    setState(337);
    _errHandler->sync(this);

    switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 23, _ctx)) {
    case 1: {
      setState(336);
      match(HogQLParser::SEMICOLON);
      break;
    }

    default:
      break;
    }
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- EmptyStmtContext ------------------------------------------------------------------

HogQLParser::EmptyStmtContext::EmptyStmtContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

tree::TerminalNode* HogQLParser::EmptyStmtContext::SEMICOLON() {
  return getToken(HogQLParser::SEMICOLON, 0);
}


size_t HogQLParser::EmptyStmtContext::getRuleIndex() const {
  return HogQLParser::RuleEmptyStmt;
}


std::any HogQLParser::EmptyStmtContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
    return parserVisitor->visitEmptyStmt(this);
  else
    return visitor->visitChildren(this);
}

HogQLParser::EmptyStmtContext* HogQLParser::emptyStmt() {
  EmptyStmtContext *_localctx = _tracker.createInstance<EmptyStmtContext>(_ctx, getState());
  enterRule(_localctx, 34, HogQLParser::RuleEmptyStmt);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(339);
    match(HogQLParser::SEMICOLON);
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- BlockContext ------------------------------------------------------------------

HogQLParser::BlockContext::BlockContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

tree::TerminalNode* HogQLParser::BlockContext::LBRACE() {
  return getToken(HogQLParser::LBRACE, 0);
}

tree::TerminalNode* HogQLParser::BlockContext::RBRACE() {
  return getToken(HogQLParser::RBRACE, 0);
}

std::vector<HogQLParser::DeclarationContext *> HogQLParser::BlockContext::declaration() {
  return getRuleContexts<HogQLParser::DeclarationContext>();
}

HogQLParser::DeclarationContext* HogQLParser::BlockContext::declaration(size_t i) {
  return getRuleContext<HogQLParser::DeclarationContext>(i);
}


size_t HogQLParser::BlockContext::getRuleIndex() const {
  return HogQLParser::RuleBlock;
}


std::any HogQLParser::BlockContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
    return parserVisitor->visitBlock(this);
  else
    return visitor->visitChildren(this);
}

HogQLParser::BlockContext* HogQLParser::block() {
  BlockContext *_localctx = _tracker.createInstance<BlockContext>(_ctx, getState());
  enterRule(_localctx, 36, HogQLParser::RuleBlock);
  size_t _la = 0;

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(341);
    match(HogQLParser::LBRACE);
    setState(345);
    _errHandler->sync(this);
    _la = _input->LA(1);
    while ((((_la & ~ 0x3fULL) == 0) &&
      ((1ULL << _la) & -140738696331266) != 0) || ((((_la - 64) & ~ 0x3fULL) == 0) &&
      ((1ULL << (_la - 64)) & 723944844006785023) != 0) || ((((_la - 131) & ~ 0x3fULL) == 0) &&
      ((1ULL << (_la - 131)) & 8425495) != 0)) {
      setState(342);
      declaration();
      setState(347);
      _errHandler->sync(this);
      _la = _input->LA(1);
    }
    setState(348);
    match(HogQLParser::RBRACE);
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- KvPairContext ------------------------------------------------------------------

HogQLParser::KvPairContext::KvPairContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

std::vector<HogQLParser::ExpressionContext *> HogQLParser::KvPairContext::expression() {
  return getRuleContexts<HogQLParser::ExpressionContext>();
}

HogQLParser::ExpressionContext* HogQLParser::KvPairContext::expression(size_t i) {
  return getRuleContext<HogQLParser::ExpressionContext>(i);
}

tree::TerminalNode* HogQLParser::KvPairContext::COLON() {
  return getToken(HogQLParser::COLON, 0);
}


size_t HogQLParser::KvPairContext::getRuleIndex() const {
  return HogQLParser::RuleKvPair;
}


std::any HogQLParser::KvPairContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
    return parserVisitor->visitKvPair(this);
  else
    return visitor->visitChildren(this);
}

HogQLParser::KvPairContext* HogQLParser::kvPair() {
  KvPairContext *_localctx = _tracker.createInstance<KvPairContext>(_ctx, getState());
  enterRule(_localctx, 38, HogQLParser::RuleKvPair);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(350);
    expression();
    setState(351);
    match(HogQLParser::COLON);
    setState(352);
    expression();
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- KvPairListContext ------------------------------------------------------------------

HogQLParser::KvPairListContext::KvPairListContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

std::vector<HogQLParser::KvPairContext *> HogQLParser::KvPairListContext::kvPair() {
  return getRuleContexts<HogQLParser::KvPairContext>();
}

HogQLParser::KvPairContext* HogQLParser::KvPairListContext::kvPair(size_t i) {
  return getRuleContext<HogQLParser::KvPairContext>(i);
}

std::vector<tree::TerminalNode *> HogQLParser::KvPairListContext::COMMA() {
  return getTokens(HogQLParser::COMMA);
}

tree::TerminalNode* HogQLParser::KvPairListContext::COMMA(size_t i) {
  return getToken(HogQLParser::COMMA, i);
}


size_t HogQLParser::KvPairListContext::getRuleIndex() const {
  return HogQLParser::RuleKvPairList;
}


std::any HogQLParser::KvPairListContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
    return parserVisitor->visitKvPairList(this);
  else
    return visitor->visitChildren(this);
}

HogQLParser::KvPairListContext* HogQLParser::kvPairList() {
  KvPairListContext *_localctx = _tracker.createInstance<KvPairListContext>(_ctx, getState());
  enterRule(_localctx, 40, HogQLParser::RuleKvPairList);
  size_t _la = 0;

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    size_t alt;
    enterOuterAlt(_localctx, 1);
    setState(354);
    kvPair();
    setState(359);
    _errHandler->sync(this);
    alt = getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 25, _ctx);
    while (alt != 2 && alt != atn::ATN::INVALID_ALT_NUMBER) {
      if (alt == 1) {
        setState(355);
        match(HogQLParser::COMMA);
        setState(356);
        kvPair(); 
      }
      setState(361);
      _errHandler->sync(this);
      alt = getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 25, _ctx);
    }
    setState(363);
    _errHandler->sync(this);

    _la = _input->LA(1);
    if (_la == HogQLParser::COMMA) {
      setState(362);
      match(HogQLParser::COMMA);
    }
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- SelectContext ------------------------------------------------------------------

HogQLParser::SelectContext::SelectContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

tree::TerminalNode* HogQLParser::SelectContext::EOF() {
  return getToken(HogQLParser::EOF, 0);
}

HogQLParser::SelectSetStmtContext* HogQLParser::SelectContext::selectSetStmt() {
  return getRuleContext<HogQLParser::SelectSetStmtContext>(0);
}

HogQLParser::SelectStmtContext* HogQLParser::SelectContext::selectStmt() {
  return getRuleContext<HogQLParser::SelectStmtContext>(0);
}

HogQLParser::HogqlxTagElementContext* HogQLParser::SelectContext::hogqlxTagElement() {
  return getRuleContext<HogQLParser::HogqlxTagElementContext>(0);
}

tree::TerminalNode* HogQLParser::SelectContext::SEMICOLON() {
  return getToken(HogQLParser::SEMICOLON, 0);
}


size_t HogQLParser::SelectContext::getRuleIndex() const {
  return HogQLParser::RuleSelect;
}


std::any HogQLParser::SelectContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
    return parserVisitor->visitSelect(this);
  else
    return visitor->visitChildren(this);
}

HogQLParser::SelectContext* HogQLParser::select() {
  SelectContext *_localctx = _tracker.createInstance<SelectContext>(_ctx, getState());
  enterRule(_localctx, 42, HogQLParser::RuleSelect);
  size_t _la = 0;

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(368);
    _errHandler->sync(this);
    switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 27, _ctx)) {
    case 1: {
      setState(365);
      selectSetStmt();
      break;
    }

    case 2: {
      setState(366);
      selectStmt();
      break;
    }

    case 3: {
      setState(367);
      hogqlxTagElement();
      break;
    }

    default:
      break;
    }
    setState(371);
    _errHandler->sync(this);

    _la = _input->LA(1);
    if (_la == HogQLParser::SEMICOLON) {
      setState(370);
      match(HogQLParser::SEMICOLON);
    }
    setState(373);
    match(HogQLParser::EOF);
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- SelectStmtWithParensContext ------------------------------------------------------------------

HogQLParser::SelectStmtWithParensContext::SelectStmtWithParensContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

HogQLParser::SelectStmtContext* HogQLParser::SelectStmtWithParensContext::selectStmt() {
  return getRuleContext<HogQLParser::SelectStmtContext>(0);
}

tree::TerminalNode* HogQLParser::SelectStmtWithParensContext::LPAREN() {
  return getToken(HogQLParser::LPAREN, 0);
}

HogQLParser::SelectSetStmtContext* HogQLParser::SelectStmtWithParensContext::selectSetStmt() {
  return getRuleContext<HogQLParser::SelectSetStmtContext>(0);
}

tree::TerminalNode* HogQLParser::SelectStmtWithParensContext::RPAREN() {
  return getToken(HogQLParser::RPAREN, 0);
}

HogQLParser::PlaceholderContext* HogQLParser::SelectStmtWithParensContext::placeholder() {
  return getRuleContext<HogQLParser::PlaceholderContext>(0);
}


size_t HogQLParser::SelectStmtWithParensContext::getRuleIndex() const {
  return HogQLParser::RuleSelectStmtWithParens;
}


std::any HogQLParser::SelectStmtWithParensContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
    return parserVisitor->visitSelectStmtWithParens(this);
  else
    return visitor->visitChildren(this);
}

HogQLParser::SelectStmtWithParensContext* HogQLParser::selectStmtWithParens() {
  SelectStmtWithParensContext *_localctx = _tracker.createInstance<SelectStmtWithParensContext>(_ctx, getState());
  enterRule(_localctx, 44, HogQLParser::RuleSelectStmtWithParens);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    setState(381);
    _errHandler->sync(this);
    switch (_input->LA(1)) {
      case HogQLParser::SELECT:
      case HogQLParser::WITH: {
        enterOuterAlt(_localctx, 1);
        setState(375);
        selectStmt();
        break;
      }

      case HogQLParser::LPAREN: {
        enterOuterAlt(_localctx, 2);
        setState(376);
        match(HogQLParser::LPAREN);
        setState(377);
        selectSetStmt();
        setState(378);
        match(HogQLParser::RPAREN);
        break;
      }

      case HogQLParser::LBRACE: {
        enterOuterAlt(_localctx, 3);
        setState(380);
        placeholder();
        break;
      }

    default:
      throw NoViableAltException(this);
    }
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- SubsequentSelectSetClauseContext ------------------------------------------------------------------

HogQLParser::SubsequentSelectSetClauseContext::SubsequentSelectSetClauseContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

HogQLParser::SelectStmtWithParensContext* HogQLParser::SubsequentSelectSetClauseContext::selectStmtWithParens() {
  return getRuleContext<HogQLParser::SelectStmtWithParensContext>(0);
}

tree::TerminalNode* HogQLParser::SubsequentSelectSetClauseContext::EXCEPT() {
  return getToken(HogQLParser::EXCEPT, 0);
}

tree::TerminalNode* HogQLParser::SubsequentSelectSetClauseContext::UNION() {
  return getToken(HogQLParser::UNION, 0);
}

tree::TerminalNode* HogQLParser::SubsequentSelectSetClauseContext::ALL() {
  return getToken(HogQLParser::ALL, 0);
}

tree::TerminalNode* HogQLParser::SubsequentSelectSetClauseContext::DISTINCT() {
  return getToken(HogQLParser::DISTINCT, 0);
}

tree::TerminalNode* HogQLParser::SubsequentSelectSetClauseContext::INTERSECT() {
  return getToken(HogQLParser::INTERSECT, 0);
}


size_t HogQLParser::SubsequentSelectSetClauseContext::getRuleIndex() const {
  return HogQLParser::RuleSubsequentSelectSetClause;
}


std::any HogQLParser::SubsequentSelectSetClauseContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
    return parserVisitor->visitSubsequentSelectSetClause(this);
  else
    return visitor->visitChildren(this);
}

HogQLParser::SubsequentSelectSetClauseContext* HogQLParser::subsequentSelectSetClause() {
  SubsequentSelectSetClauseContext *_localctx = _tracker.createInstance<SubsequentSelectSetClauseContext>(_ctx, getState());
  enterRule(_localctx, 46, HogQLParser::RuleSubsequentSelectSetClause);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(391);
    _errHandler->sync(this);
    switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 30, _ctx)) {
    case 1: {
      setState(383);
      match(HogQLParser::EXCEPT);
      break;
    }

    case 2: {
      setState(384);
      match(HogQLParser::UNION);
      setState(385);
      match(HogQLParser::ALL);
      break;
    }

    case 3: {
      setState(386);
      match(HogQLParser::UNION);
      setState(387);
      match(HogQLParser::DISTINCT);
      break;
    }

    case 4: {
      setState(388);
      match(HogQLParser::INTERSECT);
      break;
    }

    case 5: {
      setState(389);
      match(HogQLParser::INTERSECT);
      setState(390);
      match(HogQLParser::DISTINCT);
      break;
    }

    default:
      break;
    }
    setState(393);
    selectStmtWithParens();
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- SelectSetStmtContext ------------------------------------------------------------------

HogQLParser::SelectSetStmtContext::SelectSetStmtContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

HogQLParser::SelectStmtWithParensContext* HogQLParser::SelectSetStmtContext::selectStmtWithParens() {
  return getRuleContext<HogQLParser::SelectStmtWithParensContext>(0);
}

std::vector<HogQLParser::SubsequentSelectSetClauseContext *> HogQLParser::SelectSetStmtContext::subsequentSelectSetClause() {
  return getRuleContexts<HogQLParser::SubsequentSelectSetClauseContext>();
}

HogQLParser::SubsequentSelectSetClauseContext* HogQLParser::SelectSetStmtContext::subsequentSelectSetClause(size_t i) {
  return getRuleContext<HogQLParser::SubsequentSelectSetClauseContext>(i);
}


size_t HogQLParser::SelectSetStmtContext::getRuleIndex() const {
  return HogQLParser::RuleSelectSetStmt;
}


std::any HogQLParser::SelectSetStmtContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
    return parserVisitor->visitSelectSetStmt(this);
  else
    return visitor->visitChildren(this);
}

HogQLParser::SelectSetStmtContext* HogQLParser::selectSetStmt() {
  SelectSetStmtContext *_localctx = _tracker.createInstance<SelectSetStmtContext>(_ctx, getState());
  enterRule(_localctx, 48, HogQLParser::RuleSelectSetStmt);
  size_t _la = 0;

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(395);
    selectStmtWithParens();
    setState(399);
    _errHandler->sync(this);
    _la = _input->LA(1);
    while (_la == HogQLParser::EXCEPT

    || _la == HogQLParser::INTERSECT || _la == HogQLParser::UNION) {
      setState(396);
      subsequentSelectSetClause();
      setState(401);
      _errHandler->sync(this);
      _la = _input->LA(1);
    }
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- SelectStmtContext ------------------------------------------------------------------

HogQLParser::SelectStmtContext::SelectStmtContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

tree::TerminalNode* HogQLParser::SelectStmtContext::SELECT() {
  return getToken(HogQLParser::SELECT, 0);
}

HogQLParser::ColumnExprListContext* HogQLParser::SelectStmtContext::columnExprList() {
  return getRuleContext<HogQLParser::ColumnExprListContext>(0);
}

tree::TerminalNode* HogQLParser::SelectStmtContext::DISTINCT() {
  return getToken(HogQLParser::DISTINCT, 0);
}

HogQLParser::TopClauseContext* HogQLParser::SelectStmtContext::topClause() {
  return getRuleContext<HogQLParser::TopClauseContext>(0);
}

HogQLParser::ArrayJoinClauseContext* HogQLParser::SelectStmtContext::arrayJoinClause() {
  return getRuleContext<HogQLParser::ArrayJoinClauseContext>(0);
}

HogQLParser::PrewhereClauseContext* HogQLParser::SelectStmtContext::prewhereClause() {
  return getRuleContext<HogQLParser::PrewhereClauseContext>(0);
}

HogQLParser::GroupByClauseContext* HogQLParser::SelectStmtContext::groupByClause() {
  return getRuleContext<HogQLParser::GroupByClauseContext>(0);
}

std::vector<tree::TerminalNode *> HogQLParser::SelectStmtContext::WITH() {
  return getTokens(HogQLParser::WITH);
}

tree::TerminalNode* HogQLParser::SelectStmtContext::WITH(size_t i) {
  return getToken(HogQLParser::WITH, i);
}

tree::TerminalNode* HogQLParser::SelectStmtContext::TOTALS() {
  return getToken(HogQLParser::TOTALS, 0);
}

HogQLParser::HavingClauseContext* HogQLParser::SelectStmtContext::havingClause() {
  return getRuleContext<HogQLParser::HavingClauseContext>(0);
}

HogQLParser::WindowClauseContext* HogQLParser::SelectStmtContext::windowClause() {
  return getRuleContext<HogQLParser::WindowClauseContext>(0);
}

HogQLParser::OrderByClauseContext* HogQLParser::SelectStmtContext::orderByClause() {
  return getRuleContext<HogQLParser::OrderByClauseContext>(0);
}

HogQLParser::LimitByClauseContext* HogQLParser::SelectStmtContext::limitByClause() {
  return getRuleContext<HogQLParser::LimitByClauseContext>(0);
}

HogQLParser::LimitAndOffsetClauseContext* HogQLParser::SelectStmtContext::limitAndOffsetClause() {
  return getRuleContext<HogQLParser::LimitAndOffsetClauseContext>(0);
}

HogQLParser::OffsetOnlyClauseContext* HogQLParser::SelectStmtContext::offsetOnlyClause() {
  return getRuleContext<HogQLParser::OffsetOnlyClauseContext>(0);
}

HogQLParser::SettingsClauseContext* HogQLParser::SelectStmtContext::settingsClause() {
  return getRuleContext<HogQLParser::SettingsClauseContext>(0);
}

HogQLParser::WithClauseContext* HogQLParser::SelectStmtContext::withClause() {
  return getRuleContext<HogQLParser::WithClauseContext>(0);
}

HogQLParser::FromClauseContext* HogQLParser::SelectStmtContext::fromClause() {
  return getRuleContext<HogQLParser::FromClauseContext>(0);
}

HogQLParser::WhereClauseContext* HogQLParser::SelectStmtContext::whereClause() {
  return getRuleContext<HogQLParser::WhereClauseContext>(0);
}

tree::TerminalNode* HogQLParser::SelectStmtContext::CUBE() {
  return getToken(HogQLParser::CUBE, 0);
}

tree::TerminalNode* HogQLParser::SelectStmtContext::ROLLUP() {
  return getToken(HogQLParser::ROLLUP, 0);
}


size_t HogQLParser::SelectStmtContext::getRuleIndex() const {
  return HogQLParser::RuleSelectStmt;
}


std::any HogQLParser::SelectStmtContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
    return parserVisitor->visitSelectStmt(this);
  else
    return visitor->visitChildren(this);
}

HogQLParser::SelectStmtContext* HogQLParser::selectStmt() {
  SelectStmtContext *_localctx = _tracker.createInstance<SelectStmtContext>(_ctx, getState());
  enterRule(_localctx, 50, HogQLParser::RuleSelectStmt);
  size_t _la = 0;

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(403);
    _errHandler->sync(this);

    _la = _input->LA(1);
    if (_la == HogQLParser::WITH) {
      setState(402);
      antlrcpp::downCast<SelectStmtContext *>(_localctx)->with = withClause();
    }
    setState(405);
    match(HogQLParser::SELECT);
    setState(407);
    _errHandler->sync(this);

    switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 33, _ctx)) {
    case 1: {
      setState(406);
      match(HogQLParser::DISTINCT);
      break;
    }

    default:
      break;
    }
    setState(410);
    _errHandler->sync(this);

    switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 34, _ctx)) {
    case 1: {
      setState(409);
      topClause();
      break;
    }

    default:
      break;
    }
    setState(412);
    antlrcpp::downCast<SelectStmtContext *>(_localctx)->columns = columnExprList();
    setState(414);
    _errHandler->sync(this);

    _la = _input->LA(1);
    if (_la == HogQLParser::FROM) {
      setState(413);
      antlrcpp::downCast<SelectStmtContext *>(_localctx)->from = fromClause();
    }
    setState(417);
    _errHandler->sync(this);

    _la = _input->LA(1);
    if ((((_la & ~ 0x3fULL) == 0) &&
      ((1ULL << _la) & 18084767253659680) != 0)) {
      setState(416);
      arrayJoinClause();
    }
    setState(420);
    _errHandler->sync(this);

    _la = _input->LA(1);
    if (_la == HogQLParser::PREWHERE) {
      setState(419);
      prewhereClause();
    }
    setState(423);
    _errHandler->sync(this);

    _la = _input->LA(1);
    if (_la == HogQLParser::WHERE) {
      setState(422);
      antlrcpp::downCast<SelectStmtContext *>(_localctx)->where = whereClause();
    }
    setState(426);
    _errHandler->sync(this);

    _la = _input->LA(1);
    if (_la == HogQLParser::GROUP) {
      setState(425);
      groupByClause();
    }
    setState(430);
    _errHandler->sync(this);

    switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 40, _ctx)) {
    case 1: {
      setState(428);
      match(HogQLParser::WITH);
      setState(429);
      _la = _input->LA(1);
      if (!(_la == HogQLParser::CUBE

      || _la == HogQLParser::ROLLUP)) {
      _errHandler->recoverInline(this);
      }
      else {
        _errHandler->reportMatch(this);
        consume();
      }
      break;
    }

    default:
      break;
    }
    setState(434);
    _errHandler->sync(this);

    _la = _input->LA(1);
    if (_la == HogQLParser::WITH) {
      setState(432);
      match(HogQLParser::WITH);
      setState(433);
      match(HogQLParser::TOTALS);
    }
    setState(437);
    _errHandler->sync(this);

    _la = _input->LA(1);
    if (_la == HogQLParser::HAVING) {
      setState(436);
      havingClause();
    }
    setState(440);
    _errHandler->sync(this);

    _la = _input->LA(1);
    if (_la == HogQLParser::WINDOW) {
      setState(439);
      windowClause();
    }
    setState(443);
    _errHandler->sync(this);

    _la = _input->LA(1);
    if (_la == HogQLParser::ORDER) {
      setState(442);
      orderByClause();
    }
    setState(446);
    _errHandler->sync(this);

    switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 45, _ctx)) {
    case 1: {
      setState(445);
      limitByClause();
      break;
    }

    default:
      break;
    }
    setState(450);
    _errHandler->sync(this);
    switch (_input->LA(1)) {
      case HogQLParser::LIMIT: {
        setState(448);
        limitAndOffsetClause();
        break;
      }

      case HogQLParser::OFFSET: {
        setState(449);
        offsetOnlyClause();
        break;
      }

      case HogQLParser::EOF:
      case HogQLParser::EXCEPT:
      case HogQLParser::INTERSECT:
      case HogQLParser::SETTINGS:
      case HogQLParser::UNION:
      case HogQLParser::RPAREN:
      case HogQLParser::SEMICOLON: {
        break;
      }

    default:
      break;
    }
    setState(453);
    _errHandler->sync(this);

    _la = _input->LA(1);
    if (_la == HogQLParser::SETTINGS) {
      setState(452);
      settingsClause();
    }
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- WithClauseContext ------------------------------------------------------------------

HogQLParser::WithClauseContext::WithClauseContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

tree::TerminalNode* HogQLParser::WithClauseContext::WITH() {
  return getToken(HogQLParser::WITH, 0);
}

HogQLParser::WithExprListContext* HogQLParser::WithClauseContext::withExprList() {
  return getRuleContext<HogQLParser::WithExprListContext>(0);
}


size_t HogQLParser::WithClauseContext::getRuleIndex() const {
  return HogQLParser::RuleWithClause;
}


std::any HogQLParser::WithClauseContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
    return parserVisitor->visitWithClause(this);
  else
    return visitor->visitChildren(this);
}

HogQLParser::WithClauseContext* HogQLParser::withClause() {
  WithClauseContext *_localctx = _tracker.createInstance<WithClauseContext>(_ctx, getState());
  enterRule(_localctx, 52, HogQLParser::RuleWithClause);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(455);
    match(HogQLParser::WITH);
    setState(456);
    withExprList();
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- TopClauseContext ------------------------------------------------------------------

HogQLParser::TopClauseContext::TopClauseContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

tree::TerminalNode* HogQLParser::TopClauseContext::TOP() {
  return getToken(HogQLParser::TOP, 0);
}

tree::TerminalNode* HogQLParser::TopClauseContext::DECIMAL_LITERAL() {
  return getToken(HogQLParser::DECIMAL_LITERAL, 0);
}

tree::TerminalNode* HogQLParser::TopClauseContext::WITH() {
  return getToken(HogQLParser::WITH, 0);
}

tree::TerminalNode* HogQLParser::TopClauseContext::TIES() {
  return getToken(HogQLParser::TIES, 0);
}


size_t HogQLParser::TopClauseContext::getRuleIndex() const {
  return HogQLParser::RuleTopClause;
}


std::any HogQLParser::TopClauseContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
    return parserVisitor->visitTopClause(this);
  else
    return visitor->visitChildren(this);
}

HogQLParser::TopClauseContext* HogQLParser::topClause() {
  TopClauseContext *_localctx = _tracker.createInstance<TopClauseContext>(_ctx, getState());
  enterRule(_localctx, 54, HogQLParser::RuleTopClause);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(458);
    match(HogQLParser::TOP);
    setState(459);
    match(HogQLParser::DECIMAL_LITERAL);
    setState(462);
    _errHandler->sync(this);

    switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 48, _ctx)) {
    case 1: {
      setState(460);
      match(HogQLParser::WITH);
      setState(461);
      match(HogQLParser::TIES);
      break;
    }

    default:
      break;
    }
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- FromClauseContext ------------------------------------------------------------------

HogQLParser::FromClauseContext::FromClauseContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

tree::TerminalNode* HogQLParser::FromClauseContext::FROM() {
  return getToken(HogQLParser::FROM, 0);
}

HogQLParser::JoinExprContext* HogQLParser::FromClauseContext::joinExpr() {
  return getRuleContext<HogQLParser::JoinExprContext>(0);
}


size_t HogQLParser::FromClauseContext::getRuleIndex() const {
  return HogQLParser::RuleFromClause;
}


std::any HogQLParser::FromClauseContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
    return parserVisitor->visitFromClause(this);
  else
    return visitor->visitChildren(this);
}

HogQLParser::FromClauseContext* HogQLParser::fromClause() {
  FromClauseContext *_localctx = _tracker.createInstance<FromClauseContext>(_ctx, getState());
  enterRule(_localctx, 56, HogQLParser::RuleFromClause);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(464);
    match(HogQLParser::FROM);
    setState(465);
    joinExpr(0);
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- ArrayJoinClauseContext ------------------------------------------------------------------

HogQLParser::ArrayJoinClauseContext::ArrayJoinClauseContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

tree::TerminalNode* HogQLParser::ArrayJoinClauseContext::ARRAY() {
  return getToken(HogQLParser::ARRAY, 0);
}

tree::TerminalNode* HogQLParser::ArrayJoinClauseContext::JOIN() {
  return getToken(HogQLParser::JOIN, 0);
}

HogQLParser::ColumnExprListContext* HogQLParser::ArrayJoinClauseContext::columnExprList() {
  return getRuleContext<HogQLParser::ColumnExprListContext>(0);
}

tree::TerminalNode* HogQLParser::ArrayJoinClauseContext::LEFT() {
  return getToken(HogQLParser::LEFT, 0);
}

tree::TerminalNode* HogQLParser::ArrayJoinClauseContext::INNER() {
  return getToken(HogQLParser::INNER, 0);
}


size_t HogQLParser::ArrayJoinClauseContext::getRuleIndex() const {
  return HogQLParser::RuleArrayJoinClause;
}


std::any HogQLParser::ArrayJoinClauseContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
    return parserVisitor->visitArrayJoinClause(this);
  else
    return visitor->visitChildren(this);
}

HogQLParser::ArrayJoinClauseContext* HogQLParser::arrayJoinClause() {
  ArrayJoinClauseContext *_localctx = _tracker.createInstance<ArrayJoinClauseContext>(_ctx, getState());
  enterRule(_localctx, 58, HogQLParser::RuleArrayJoinClause);
  size_t _la = 0;

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(468);
    _errHandler->sync(this);

    _la = _input->LA(1);
    if (_la == HogQLParser::INNER

    || _la == HogQLParser::LEFT) {
      setState(467);
      _la = _input->LA(1);
      if (!(_la == HogQLParser::INNER

      || _la == HogQLParser::LEFT)) {
      _errHandler->recoverInline(this);
      }
      else {
        _errHandler->reportMatch(this);
        consume();
      }
    }
    setState(470);
    match(HogQLParser::ARRAY);
    setState(471);
    match(HogQLParser::JOIN);
    setState(472);
    columnExprList();
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- WindowClauseContext ------------------------------------------------------------------

HogQLParser::WindowClauseContext::WindowClauseContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

tree::TerminalNode* HogQLParser::WindowClauseContext::WINDOW() {
  return getToken(HogQLParser::WINDOW, 0);
}

std::vector<HogQLParser::IdentifierContext *> HogQLParser::WindowClauseContext::identifier() {
  return getRuleContexts<HogQLParser::IdentifierContext>();
}

HogQLParser::IdentifierContext* HogQLParser::WindowClauseContext::identifier(size_t i) {
  return getRuleContext<HogQLParser::IdentifierContext>(i);
}

std::vector<tree::TerminalNode *> HogQLParser::WindowClauseContext::AS() {
  return getTokens(HogQLParser::AS);
}

tree::TerminalNode* HogQLParser::WindowClauseContext::AS(size_t i) {
  return getToken(HogQLParser::AS, i);
}

std::vector<tree::TerminalNode *> HogQLParser::WindowClauseContext::LPAREN() {
  return getTokens(HogQLParser::LPAREN);
}

tree::TerminalNode* HogQLParser::WindowClauseContext::LPAREN(size_t i) {
  return getToken(HogQLParser::LPAREN, i);
}

std::vector<HogQLParser::WindowExprContext *> HogQLParser::WindowClauseContext::windowExpr() {
  return getRuleContexts<HogQLParser::WindowExprContext>();
}

HogQLParser::WindowExprContext* HogQLParser::WindowClauseContext::windowExpr(size_t i) {
  return getRuleContext<HogQLParser::WindowExprContext>(i);
}

std::vector<tree::TerminalNode *> HogQLParser::WindowClauseContext::RPAREN() {
  return getTokens(HogQLParser::RPAREN);
}

tree::TerminalNode* HogQLParser::WindowClauseContext::RPAREN(size_t i) {
  return getToken(HogQLParser::RPAREN, i);
}

std::vector<tree::TerminalNode *> HogQLParser::WindowClauseContext::COMMA() {
  return getTokens(HogQLParser::COMMA);
}

tree::TerminalNode* HogQLParser::WindowClauseContext::COMMA(size_t i) {
  return getToken(HogQLParser::COMMA, i);
}


size_t HogQLParser::WindowClauseContext::getRuleIndex() const {
  return HogQLParser::RuleWindowClause;
}


std::any HogQLParser::WindowClauseContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
    return parserVisitor->visitWindowClause(this);
  else
    return visitor->visitChildren(this);
}

HogQLParser::WindowClauseContext* HogQLParser::windowClause() {
  WindowClauseContext *_localctx = _tracker.createInstance<WindowClauseContext>(_ctx, getState());
  enterRule(_localctx, 60, HogQLParser::RuleWindowClause);
  size_t _la = 0;

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(474);
    match(HogQLParser::WINDOW);
    setState(475);
    identifier();
    setState(476);
    match(HogQLParser::AS);
    setState(477);
    match(HogQLParser::LPAREN);
    setState(478);
    windowExpr();
    setState(479);
    match(HogQLParser::RPAREN);
    setState(489);
    _errHandler->sync(this);
    _la = _input->LA(1);
    while (_la == HogQLParser::COMMA) {
      setState(480);
      match(HogQLParser::COMMA);
      setState(481);
      identifier();
      setState(482);
      match(HogQLParser::AS);
      setState(483);
      match(HogQLParser::LPAREN);
      setState(484);
      windowExpr();
      setState(485);
      match(HogQLParser::RPAREN);
      setState(491);
      _errHandler->sync(this);
      _la = _input->LA(1);
    }
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- PrewhereClauseContext ------------------------------------------------------------------

HogQLParser::PrewhereClauseContext::PrewhereClauseContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

tree::TerminalNode* HogQLParser::PrewhereClauseContext::PREWHERE() {
  return getToken(HogQLParser::PREWHERE, 0);
}

HogQLParser::ColumnExprContext* HogQLParser::PrewhereClauseContext::columnExpr() {
  return getRuleContext<HogQLParser::ColumnExprContext>(0);
}


size_t HogQLParser::PrewhereClauseContext::getRuleIndex() const {
  return HogQLParser::RulePrewhereClause;
}


std::any HogQLParser::PrewhereClauseContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
    return parserVisitor->visitPrewhereClause(this);
  else
    return visitor->visitChildren(this);
}

HogQLParser::PrewhereClauseContext* HogQLParser::prewhereClause() {
  PrewhereClauseContext *_localctx = _tracker.createInstance<PrewhereClauseContext>(_ctx, getState());
  enterRule(_localctx, 62, HogQLParser::RulePrewhereClause);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(492);
    match(HogQLParser::PREWHERE);
    setState(493);
    columnExpr(0);
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- WhereClauseContext ------------------------------------------------------------------

HogQLParser::WhereClauseContext::WhereClauseContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

tree::TerminalNode* HogQLParser::WhereClauseContext::WHERE() {
  return getToken(HogQLParser::WHERE, 0);
}

HogQLParser::ColumnExprContext* HogQLParser::WhereClauseContext::columnExpr() {
  return getRuleContext<HogQLParser::ColumnExprContext>(0);
}


size_t HogQLParser::WhereClauseContext::getRuleIndex() const {
  return HogQLParser::RuleWhereClause;
}


std::any HogQLParser::WhereClauseContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
    return parserVisitor->visitWhereClause(this);
  else
    return visitor->visitChildren(this);
}

HogQLParser::WhereClauseContext* HogQLParser::whereClause() {
  WhereClauseContext *_localctx = _tracker.createInstance<WhereClauseContext>(_ctx, getState());
  enterRule(_localctx, 64, HogQLParser::RuleWhereClause);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(495);
    match(HogQLParser::WHERE);
    setState(496);
    columnExpr(0);
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- GroupByClauseContext ------------------------------------------------------------------

HogQLParser::GroupByClauseContext::GroupByClauseContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

tree::TerminalNode* HogQLParser::GroupByClauseContext::GROUP() {
  return getToken(HogQLParser::GROUP, 0);
}

tree::TerminalNode* HogQLParser::GroupByClauseContext::BY() {
  return getToken(HogQLParser::BY, 0);
}

tree::TerminalNode* HogQLParser::GroupByClauseContext::LPAREN() {
  return getToken(HogQLParser::LPAREN, 0);
}

HogQLParser::ColumnExprListContext* HogQLParser::GroupByClauseContext::columnExprList() {
  return getRuleContext<HogQLParser::ColumnExprListContext>(0);
}

tree::TerminalNode* HogQLParser::GroupByClauseContext::RPAREN() {
  return getToken(HogQLParser::RPAREN, 0);
}

tree::TerminalNode* HogQLParser::GroupByClauseContext::CUBE() {
  return getToken(HogQLParser::CUBE, 0);
}

tree::TerminalNode* HogQLParser::GroupByClauseContext::ROLLUP() {
  return getToken(HogQLParser::ROLLUP, 0);
}


size_t HogQLParser::GroupByClauseContext::getRuleIndex() const {
  return HogQLParser::RuleGroupByClause;
}


std::any HogQLParser::GroupByClauseContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
    return parserVisitor->visitGroupByClause(this);
  else
    return visitor->visitChildren(this);
}

HogQLParser::GroupByClauseContext* HogQLParser::groupByClause() {
  GroupByClauseContext *_localctx = _tracker.createInstance<GroupByClauseContext>(_ctx, getState());
  enterRule(_localctx, 66, HogQLParser::RuleGroupByClause);
  size_t _la = 0;

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(498);
    match(HogQLParser::GROUP);
    setState(499);
    match(HogQLParser::BY);
    setState(506);
    _errHandler->sync(this);
    switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 51, _ctx)) {
    case 1: {
      setState(500);
      _la = _input->LA(1);
      if (!(_la == HogQLParser::CUBE

      || _la == HogQLParser::ROLLUP)) {
      _errHandler->recoverInline(this);
      }
      else {
        _errHandler->reportMatch(this);
        consume();
      }
      setState(501);
      match(HogQLParser::LPAREN);
      setState(502);
      columnExprList();
      setState(503);
      match(HogQLParser::RPAREN);
      break;
    }

    case 2: {
      setState(505);
      columnExprList();
      break;
    }

    default:
      break;
    }
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- HavingClauseContext ------------------------------------------------------------------

HogQLParser::HavingClauseContext::HavingClauseContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

tree::TerminalNode* HogQLParser::HavingClauseContext::HAVING() {
  return getToken(HogQLParser::HAVING, 0);
}

HogQLParser::ColumnExprContext* HogQLParser::HavingClauseContext::columnExpr() {
  return getRuleContext<HogQLParser::ColumnExprContext>(0);
}


size_t HogQLParser::HavingClauseContext::getRuleIndex() const {
  return HogQLParser::RuleHavingClause;
}


std::any HogQLParser::HavingClauseContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
    return parserVisitor->visitHavingClause(this);
  else
    return visitor->visitChildren(this);
}

HogQLParser::HavingClauseContext* HogQLParser::havingClause() {
  HavingClauseContext *_localctx = _tracker.createInstance<HavingClauseContext>(_ctx, getState());
  enterRule(_localctx, 68, HogQLParser::RuleHavingClause);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(508);
    match(HogQLParser::HAVING);
    setState(509);
    columnExpr(0);
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- OrderByClauseContext ------------------------------------------------------------------

HogQLParser::OrderByClauseContext::OrderByClauseContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

tree::TerminalNode* HogQLParser::OrderByClauseContext::ORDER() {
  return getToken(HogQLParser::ORDER, 0);
}

tree::TerminalNode* HogQLParser::OrderByClauseContext::BY() {
  return getToken(HogQLParser::BY, 0);
}

HogQLParser::OrderExprListContext* HogQLParser::OrderByClauseContext::orderExprList() {
  return getRuleContext<HogQLParser::OrderExprListContext>(0);
}


size_t HogQLParser::OrderByClauseContext::getRuleIndex() const {
  return HogQLParser::RuleOrderByClause;
}


std::any HogQLParser::OrderByClauseContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
    return parserVisitor->visitOrderByClause(this);
  else
    return visitor->visitChildren(this);
}

HogQLParser::OrderByClauseContext* HogQLParser::orderByClause() {
  OrderByClauseContext *_localctx = _tracker.createInstance<OrderByClauseContext>(_ctx, getState());
  enterRule(_localctx, 70, HogQLParser::RuleOrderByClause);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(511);
    match(HogQLParser::ORDER);
    setState(512);
    match(HogQLParser::BY);
    setState(513);
    orderExprList();
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- ProjectionOrderByClauseContext ------------------------------------------------------------------

HogQLParser::ProjectionOrderByClauseContext::ProjectionOrderByClauseContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

tree::TerminalNode* HogQLParser::ProjectionOrderByClauseContext::ORDER() {
  return getToken(HogQLParser::ORDER, 0);
}

tree::TerminalNode* HogQLParser::ProjectionOrderByClauseContext::BY() {
  return getToken(HogQLParser::BY, 0);
}

HogQLParser::ColumnExprListContext* HogQLParser::ProjectionOrderByClauseContext::columnExprList() {
  return getRuleContext<HogQLParser::ColumnExprListContext>(0);
}


size_t HogQLParser::ProjectionOrderByClauseContext::getRuleIndex() const {
  return HogQLParser::RuleProjectionOrderByClause;
}


std::any HogQLParser::ProjectionOrderByClauseContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
    return parserVisitor->visitProjectionOrderByClause(this);
  else
    return visitor->visitChildren(this);
}

HogQLParser::ProjectionOrderByClauseContext* HogQLParser::projectionOrderByClause() {
  ProjectionOrderByClauseContext *_localctx = _tracker.createInstance<ProjectionOrderByClauseContext>(_ctx, getState());
  enterRule(_localctx, 72, HogQLParser::RuleProjectionOrderByClause);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(515);
    match(HogQLParser::ORDER);
    setState(516);
    match(HogQLParser::BY);
    setState(517);
    columnExprList();
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- LimitByClauseContext ------------------------------------------------------------------

HogQLParser::LimitByClauseContext::LimitByClauseContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

tree::TerminalNode* HogQLParser::LimitByClauseContext::LIMIT() {
  return getToken(HogQLParser::LIMIT, 0);
}

HogQLParser::LimitExprContext* HogQLParser::LimitByClauseContext::limitExpr() {
  return getRuleContext<HogQLParser::LimitExprContext>(0);
}

tree::TerminalNode* HogQLParser::LimitByClauseContext::BY() {
  return getToken(HogQLParser::BY, 0);
}

HogQLParser::ColumnExprListContext* HogQLParser::LimitByClauseContext::columnExprList() {
  return getRuleContext<HogQLParser::ColumnExprListContext>(0);
}


size_t HogQLParser::LimitByClauseContext::getRuleIndex() const {
  return HogQLParser::RuleLimitByClause;
}


std::any HogQLParser::LimitByClauseContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
    return parserVisitor->visitLimitByClause(this);
  else
    return visitor->visitChildren(this);
}

HogQLParser::LimitByClauseContext* HogQLParser::limitByClause() {
  LimitByClauseContext *_localctx = _tracker.createInstance<LimitByClauseContext>(_ctx, getState());
  enterRule(_localctx, 74, HogQLParser::RuleLimitByClause);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(519);
    match(HogQLParser::LIMIT);
    setState(520);
    limitExpr();
    setState(521);
    match(HogQLParser::BY);
    setState(522);
    columnExprList();
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- LimitAndOffsetClauseContext ------------------------------------------------------------------

HogQLParser::LimitAndOffsetClauseContext::LimitAndOffsetClauseContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

tree::TerminalNode* HogQLParser::LimitAndOffsetClauseContext::LIMIT() {
  return getToken(HogQLParser::LIMIT, 0);
}

std::vector<HogQLParser::ColumnExprContext *> HogQLParser::LimitAndOffsetClauseContext::columnExpr() {
  return getRuleContexts<HogQLParser::ColumnExprContext>();
}

HogQLParser::ColumnExprContext* HogQLParser::LimitAndOffsetClauseContext::columnExpr(size_t i) {
  return getRuleContext<HogQLParser::ColumnExprContext>(i);
}

tree::TerminalNode* HogQLParser::LimitAndOffsetClauseContext::COMMA() {
  return getToken(HogQLParser::COMMA, 0);
}

tree::TerminalNode* HogQLParser::LimitAndOffsetClauseContext::WITH() {
  return getToken(HogQLParser::WITH, 0);
}

tree::TerminalNode* HogQLParser::LimitAndOffsetClauseContext::TIES() {
  return getToken(HogQLParser::TIES, 0);
}

tree::TerminalNode* HogQLParser::LimitAndOffsetClauseContext::OFFSET() {
  return getToken(HogQLParser::OFFSET, 0);
}


size_t HogQLParser::LimitAndOffsetClauseContext::getRuleIndex() const {
  return HogQLParser::RuleLimitAndOffsetClause;
}


std::any HogQLParser::LimitAndOffsetClauseContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
    return parserVisitor->visitLimitAndOffsetClause(this);
  else
    return visitor->visitChildren(this);
}

HogQLParser::LimitAndOffsetClauseContext* HogQLParser::limitAndOffsetClause() {
  LimitAndOffsetClauseContext *_localctx = _tracker.createInstance<LimitAndOffsetClauseContext>(_ctx, getState());
  enterRule(_localctx, 76, HogQLParser::RuleLimitAndOffsetClause);
  size_t _la = 0;

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    setState(543);
    _errHandler->sync(this);
    switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 55, _ctx)) {
    case 1: {
      enterOuterAlt(_localctx, 1);
      setState(524);
      match(HogQLParser::LIMIT);
      setState(525);
      columnExpr(0);
      setState(528);
      _errHandler->sync(this);

      _la = _input->LA(1);
      if (_la == HogQLParser::COMMA) {
        setState(526);
        match(HogQLParser::COMMA);
        setState(527);
        columnExpr(0);
      }
      setState(532);
      _errHandler->sync(this);

      _la = _input->LA(1);
      if (_la == HogQLParser::WITH) {
        setState(530);
        match(HogQLParser::WITH);
        setState(531);
        match(HogQLParser::TIES);
      }
      break;
    }

    case 2: {
      enterOuterAlt(_localctx, 2);
      setState(534);
      match(HogQLParser::LIMIT);
      setState(535);
      columnExpr(0);
      setState(538);
      _errHandler->sync(this);

      _la = _input->LA(1);
      if (_la == HogQLParser::WITH) {
        setState(536);
        match(HogQLParser::WITH);
        setState(537);
        match(HogQLParser::TIES);
      }
      setState(540);
      match(HogQLParser::OFFSET);
      setState(541);
      columnExpr(0);
      break;
    }

    default:
      break;
    }
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- OffsetOnlyClauseContext ------------------------------------------------------------------

HogQLParser::OffsetOnlyClauseContext::OffsetOnlyClauseContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

tree::TerminalNode* HogQLParser::OffsetOnlyClauseContext::OFFSET() {
  return getToken(HogQLParser::OFFSET, 0);
}

HogQLParser::ColumnExprContext* HogQLParser::OffsetOnlyClauseContext::columnExpr() {
  return getRuleContext<HogQLParser::ColumnExprContext>(0);
}


size_t HogQLParser::OffsetOnlyClauseContext::getRuleIndex() const {
  return HogQLParser::RuleOffsetOnlyClause;
}


std::any HogQLParser::OffsetOnlyClauseContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
    return parserVisitor->visitOffsetOnlyClause(this);
  else
    return visitor->visitChildren(this);
}

HogQLParser::OffsetOnlyClauseContext* HogQLParser::offsetOnlyClause() {
  OffsetOnlyClauseContext *_localctx = _tracker.createInstance<OffsetOnlyClauseContext>(_ctx, getState());
  enterRule(_localctx, 78, HogQLParser::RuleOffsetOnlyClause);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(545);
    match(HogQLParser::OFFSET);
    setState(546);
    columnExpr(0);
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- SettingsClauseContext ------------------------------------------------------------------

HogQLParser::SettingsClauseContext::SettingsClauseContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

tree::TerminalNode* HogQLParser::SettingsClauseContext::SETTINGS() {
  return getToken(HogQLParser::SETTINGS, 0);
}

HogQLParser::SettingExprListContext* HogQLParser::SettingsClauseContext::settingExprList() {
  return getRuleContext<HogQLParser::SettingExprListContext>(0);
}


size_t HogQLParser::SettingsClauseContext::getRuleIndex() const {
  return HogQLParser::RuleSettingsClause;
}


std::any HogQLParser::SettingsClauseContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
    return parserVisitor->visitSettingsClause(this);
  else
    return visitor->visitChildren(this);
}

HogQLParser::SettingsClauseContext* HogQLParser::settingsClause() {
  SettingsClauseContext *_localctx = _tracker.createInstance<SettingsClauseContext>(_ctx, getState());
  enterRule(_localctx, 80, HogQLParser::RuleSettingsClause);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(548);
    match(HogQLParser::SETTINGS);
    setState(549);
    settingExprList();
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- JoinExprContext ------------------------------------------------------------------

HogQLParser::JoinExprContext::JoinExprContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}


size_t HogQLParser::JoinExprContext::getRuleIndex() const {
  return HogQLParser::RuleJoinExpr;
}

void HogQLParser::JoinExprContext::copyFrom(JoinExprContext *ctx) {
  ParserRuleContext::copyFrom(ctx);
}

//----------------- JoinExprOpContext ------------------------------------------------------------------

std::vector<HogQLParser::JoinExprContext *> HogQLParser::JoinExprOpContext::joinExpr() {
  return getRuleContexts<HogQLParser::JoinExprContext>();
}

HogQLParser::JoinExprContext* HogQLParser::JoinExprOpContext::joinExpr(size_t i) {
  return getRuleContext<HogQLParser::JoinExprContext>(i);
}

tree::TerminalNode* HogQLParser::JoinExprOpContext::JOIN() {
  return getToken(HogQLParser::JOIN, 0);
}

HogQLParser::JoinConstraintClauseContext* HogQLParser::JoinExprOpContext::joinConstraintClause() {
  return getRuleContext<HogQLParser::JoinConstraintClauseContext>(0);
}

HogQLParser::JoinOpContext* HogQLParser::JoinExprOpContext::joinOp() {
  return getRuleContext<HogQLParser::JoinOpContext>(0);
}

HogQLParser::JoinExprOpContext::JoinExprOpContext(JoinExprContext *ctx) { copyFrom(ctx); }


std::any HogQLParser::JoinExprOpContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
    return parserVisitor->visitJoinExprOp(this);
  else
    return visitor->visitChildren(this);
}
//----------------- JoinExprTableContext ------------------------------------------------------------------

HogQLParser::TableExprContext* HogQLParser::JoinExprTableContext::tableExpr() {
  return getRuleContext<HogQLParser::TableExprContext>(0);
}

tree::TerminalNode* HogQLParser::JoinExprTableContext::FINAL() {
  return getToken(HogQLParser::FINAL, 0);
}

HogQLParser::SampleClauseContext* HogQLParser::JoinExprTableContext::sampleClause() {
  return getRuleContext<HogQLParser::SampleClauseContext>(0);
}

HogQLParser::JoinExprTableContext::JoinExprTableContext(JoinExprContext *ctx) { copyFrom(ctx); }


std::any HogQLParser::JoinExprTableContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
    return parserVisitor->visitJoinExprTable(this);
  else
    return visitor->visitChildren(this);
}
//----------------- JoinExprParensContext ------------------------------------------------------------------

tree::TerminalNode* HogQLParser::JoinExprParensContext::LPAREN() {
  return getToken(HogQLParser::LPAREN, 0);
}

HogQLParser::JoinExprContext* HogQLParser::JoinExprParensContext::joinExpr() {
  return getRuleContext<HogQLParser::JoinExprContext>(0);
}

tree::TerminalNode* HogQLParser::JoinExprParensContext::RPAREN() {
  return getToken(HogQLParser::RPAREN, 0);
}

HogQLParser::JoinExprParensContext::JoinExprParensContext(JoinExprContext *ctx) { copyFrom(ctx); }


std::any HogQLParser::JoinExprParensContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
    return parserVisitor->visitJoinExprParens(this);
  else
    return visitor->visitChildren(this);
}
//----------------- JoinExprCrossOpContext ------------------------------------------------------------------

std::vector<HogQLParser::JoinExprContext *> HogQLParser::JoinExprCrossOpContext::joinExpr() {
  return getRuleContexts<HogQLParser::JoinExprContext>();
}

HogQLParser::JoinExprContext* HogQLParser::JoinExprCrossOpContext::joinExpr(size_t i) {
  return getRuleContext<HogQLParser::JoinExprContext>(i);
}

HogQLParser::JoinOpCrossContext* HogQLParser::JoinExprCrossOpContext::joinOpCross() {
  return getRuleContext<HogQLParser::JoinOpCrossContext>(0);
}

HogQLParser::JoinExprCrossOpContext::JoinExprCrossOpContext(JoinExprContext *ctx) { copyFrom(ctx); }


std::any HogQLParser::JoinExprCrossOpContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
    return parserVisitor->visitJoinExprCrossOp(this);
  else
    return visitor->visitChildren(this);
}

HogQLParser::JoinExprContext* HogQLParser::joinExpr() {
   return joinExpr(0);
}

HogQLParser::JoinExprContext* HogQLParser::joinExpr(int precedence) {
  ParserRuleContext *parentContext = _ctx;
  size_t parentState = getState();
  HogQLParser::JoinExprContext *_localctx = _tracker.createInstance<JoinExprContext>(_ctx, parentState);
  HogQLParser::JoinExprContext *previousContext = _localctx;
  (void)previousContext; // Silence compiler, in case the context is not used by generated code.
  size_t startState = 82;
  enterRecursionRule(_localctx, 82, HogQLParser::RuleJoinExpr, precedence);

    size_t _la = 0;

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    unrollRecursionContexts(parentContext);
  });
  try {
    size_t alt;
    enterOuterAlt(_localctx, 1);
    setState(563);
    _errHandler->sync(this);
    switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 58, _ctx)) {
    case 1: {
      _localctx = _tracker.createInstance<JoinExprTableContext>(_localctx);
      _ctx = _localctx;
      previousContext = _localctx;

      setState(552);
      tableExpr(0);
      setState(554);
      _errHandler->sync(this);

      switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 56, _ctx)) {
      case 1: {
        setState(553);
        match(HogQLParser::FINAL);
        break;
      }

      default:
        break;
      }
      setState(557);
      _errHandler->sync(this);

      switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 57, _ctx)) {
      case 1: {
        setState(556);
        sampleClause();
        break;
      }

      default:
        break;
      }
      break;
    }

    case 2: {
      _localctx = _tracker.createInstance<JoinExprParensContext>(_localctx);
      _ctx = _localctx;
      previousContext = _localctx;
      setState(559);
      match(HogQLParser::LPAREN);
      setState(560);
      joinExpr(0);
      setState(561);
      match(HogQLParser::RPAREN);
      break;
    }

    default:
      break;
    }
    _ctx->stop = _input->LT(-1);
    setState(579);
    _errHandler->sync(this);
    alt = getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 61, _ctx);
    while (alt != 2 && alt != atn::ATN::INVALID_ALT_NUMBER) {
      if (alt == 1) {
        if (!_parseListeners.empty())
          triggerExitRuleEvent();
        previousContext = _localctx;
        setState(577);
        _errHandler->sync(this);
        switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 60, _ctx)) {
        case 1: {
          auto newContext = _tracker.createInstance<JoinExprCrossOpContext>(_tracker.createInstance<JoinExprContext>(parentContext, parentState));
          _localctx = newContext;
          pushNewRecursionContext(newContext, startState, RuleJoinExpr);
          setState(565);

          if (!(precpred(_ctx, 3))) throw FailedPredicateException(this, "precpred(_ctx, 3)");
          setState(566);
          joinOpCross();
          setState(567);
          joinExpr(4);
          break;
        }

        case 2: {
          auto newContext = _tracker.createInstance<JoinExprOpContext>(_tracker.createInstance<JoinExprContext>(parentContext, parentState));
          _localctx = newContext;
          pushNewRecursionContext(newContext, startState, RuleJoinExpr);
          setState(569);

          if (!(precpred(_ctx, 4))) throw FailedPredicateException(this, "precpred(_ctx, 4)");
          setState(571);
          _errHandler->sync(this);

          _la = _input->LA(1);
          if ((((_la & ~ 0x3fULL) == 0) &&
            ((1ULL << _la) & 18084835973136666) != 0) || _la == HogQLParser::RIGHT

          || _la == HogQLParser::SEMI) {
            setState(570);
            joinOp();
          }
          setState(573);
          match(HogQLParser::JOIN);
          setState(574);
          joinExpr(0);
          setState(575);
          joinConstraintClause();
          break;
        }

        default:
          break;
        } 
      }
      setState(581);
      _errHandler->sync(this);
      alt = getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 61, _ctx);
    }
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }
  return _localctx;
}

//----------------- JoinOpContext ------------------------------------------------------------------

HogQLParser::JoinOpContext::JoinOpContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}


size_t HogQLParser::JoinOpContext::getRuleIndex() const {
  return HogQLParser::RuleJoinOp;
}

void HogQLParser::JoinOpContext::copyFrom(JoinOpContext *ctx) {
  ParserRuleContext::copyFrom(ctx);
}

//----------------- JoinOpFullContext ------------------------------------------------------------------

tree::TerminalNode* HogQLParser::JoinOpFullContext::FULL() {
  return getToken(HogQLParser::FULL, 0);
}

tree::TerminalNode* HogQLParser::JoinOpFullContext::OUTER() {
  return getToken(HogQLParser::OUTER, 0);
}

tree::TerminalNode* HogQLParser::JoinOpFullContext::ALL() {
  return getToken(HogQLParser::ALL, 0);
}

tree::TerminalNode* HogQLParser::JoinOpFullContext::ANY() {
  return getToken(HogQLParser::ANY, 0);
}

HogQLParser::JoinOpFullContext::JoinOpFullContext(JoinOpContext *ctx) { copyFrom(ctx); }


std::any HogQLParser::JoinOpFullContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
    return parserVisitor->visitJoinOpFull(this);
  else
    return visitor->visitChildren(this);
}
//----------------- JoinOpInnerContext ------------------------------------------------------------------

tree::TerminalNode* HogQLParser::JoinOpInnerContext::INNER() {
  return getToken(HogQLParser::INNER, 0);
}

tree::TerminalNode* HogQLParser::JoinOpInnerContext::ALL() {
  return getToken(HogQLParser::ALL, 0);
}

tree::TerminalNode* HogQLParser::JoinOpInnerContext::ANY() {
  return getToken(HogQLParser::ANY, 0);
}

tree::TerminalNode* HogQLParser::JoinOpInnerContext::ASOF() {
  return getToken(HogQLParser::ASOF, 0);
}

HogQLParser::JoinOpInnerContext::JoinOpInnerContext(JoinOpContext *ctx) { copyFrom(ctx); }


std::any HogQLParser::JoinOpInnerContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
    return parserVisitor->visitJoinOpInner(this);
  else
    return visitor->visitChildren(this);
}
//----------------- JoinOpLeftRightContext ------------------------------------------------------------------

tree::TerminalNode* HogQLParser::JoinOpLeftRightContext::LEFT() {
  return getToken(HogQLParser::LEFT, 0);
}

tree::TerminalNode* HogQLParser::JoinOpLeftRightContext::RIGHT() {
  return getToken(HogQLParser::RIGHT, 0);
}

tree::TerminalNode* HogQLParser::JoinOpLeftRightContext::OUTER() {
  return getToken(HogQLParser::OUTER, 0);
}

tree::TerminalNode* HogQLParser::JoinOpLeftRightContext::SEMI() {
  return getToken(HogQLParser::SEMI, 0);
}

tree::TerminalNode* HogQLParser::JoinOpLeftRightContext::ALL() {
  return getToken(HogQLParser::ALL, 0);
}

tree::TerminalNode* HogQLParser::JoinOpLeftRightContext::ANTI() {
  return getToken(HogQLParser::ANTI, 0);
}

tree::TerminalNode* HogQLParser::JoinOpLeftRightContext::ANY() {
  return getToken(HogQLParser::ANY, 0);
}

tree::TerminalNode* HogQLParser::JoinOpLeftRightContext::ASOF() {
  return getToken(HogQLParser::ASOF, 0);
}

HogQLParser::JoinOpLeftRightContext::JoinOpLeftRightContext(JoinOpContext *ctx) { copyFrom(ctx); }


std::any HogQLParser::JoinOpLeftRightContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
    return parserVisitor->visitJoinOpLeftRight(this);
  else
    return visitor->visitChildren(this);
}
HogQLParser::JoinOpContext* HogQLParser::joinOp() {
  JoinOpContext *_localctx = _tracker.createInstance<JoinOpContext>(_ctx, getState());
  enterRule(_localctx, 84, HogQLParser::RuleJoinOp);
  size_t _la = 0;

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    setState(625);
    _errHandler->sync(this);
    switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 75, _ctx)) {
    case 1: {
      _localctx = _tracker.createInstance<HogQLParser::JoinOpInnerContext>(_localctx);
      enterOuterAlt(_localctx, 1);
      setState(591);
      _errHandler->sync(this);
      switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 64, _ctx)) {
      case 1: {
        setState(583);
        _errHandler->sync(this);

        _la = _input->LA(1);
        if ((((_la & ~ 0x3fULL) == 0) &&
          ((1ULL << _la) & 274) != 0)) {
          setState(582);
          _la = _input->LA(1);
          if (!((((_la & ~ 0x3fULL) == 0) &&
            ((1ULL << _la) & 274) != 0))) {
          _errHandler->recoverInline(this);
          }
          else {
            _errHandler->reportMatch(this);
            consume();
          }
        }
        setState(585);
        match(HogQLParser::INNER);
        break;
      }

      case 2: {
        setState(586);
        match(HogQLParser::INNER);
        setState(588);
        _errHandler->sync(this);

        _la = _input->LA(1);
        if ((((_la & ~ 0x3fULL) == 0) &&
          ((1ULL << _la) & 274) != 0)) {
          setState(587);
          _la = _input->LA(1);
          if (!((((_la & ~ 0x3fULL) == 0) &&
            ((1ULL << _la) & 274) != 0))) {
          _errHandler->recoverInline(this);
          }
          else {
            _errHandler->reportMatch(this);
            consume();
          }
        }
        break;
      }

      case 3: {
        setState(590);
        _la = _input->LA(1);
        if (!((((_la & ~ 0x3fULL) == 0) &&
          ((1ULL << _la) & 274) != 0))) {
        _errHandler->recoverInline(this);
        }
        else {
          _errHandler->reportMatch(this);
          consume();
        }
        break;
      }

      default:
        break;
      }
      break;
    }

    case 2: {
      _localctx = _tracker.createInstance<HogQLParser::JoinOpLeftRightContext>(_localctx);
      enterOuterAlt(_localctx, 2);
      setState(607);
      _errHandler->sync(this);
      switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 69, _ctx)) {
      case 1: {
        setState(594);
        _errHandler->sync(this);

        _la = _input->LA(1);
        if ((((_la & ~ 0x3fULL) == 0) &&
          ((1ULL << _la) & 282) != 0) || _la == HogQLParser::SEMI) {
          setState(593);
          _la = _input->LA(1);
          if (!((((_la & ~ 0x3fULL) == 0) &&
            ((1ULL << _la) & 282) != 0) || _la == HogQLParser::SEMI)) {
          _errHandler->recoverInline(this);
          }
          else {
            _errHandler->reportMatch(this);
            consume();
          }
        }
        setState(596);
        _la = _input->LA(1);
        if (!(_la == HogQLParser::LEFT

        || _la == HogQLParser::RIGHT)) {
        _errHandler->recoverInline(this);
        }
        else {
          _errHandler->reportMatch(this);
          consume();
        }
        setState(598);
        _errHandler->sync(this);

        _la = _input->LA(1);
        if (_la == HogQLParser::OUTER) {
          setState(597);
          match(HogQLParser::OUTER);
        }
        break;
      }

      case 2: {
        setState(600);
        _la = _input->LA(1);
        if (!(_la == HogQLParser::LEFT

        || _la == HogQLParser::RIGHT)) {
        _errHandler->recoverInline(this);
        }
        else {
          _errHandler->reportMatch(this);
          consume();
        }
        setState(602);
        _errHandler->sync(this);

        _la = _input->LA(1);
        if (_la == HogQLParser::OUTER) {
          setState(601);
          match(HogQLParser::OUTER);
        }
        setState(605);
        _errHandler->sync(this);

        _la = _input->LA(1);
        if ((((_la & ~ 0x3fULL) == 0) &&
          ((1ULL << _la) & 282) != 0) || _la == HogQLParser::SEMI) {
          setState(604);
          _la = _input->LA(1);
          if (!((((_la & ~ 0x3fULL) == 0) &&
            ((1ULL << _la) & 282) != 0) || _la == HogQLParser::SEMI)) {
          _errHandler->recoverInline(this);
          }
          else {
            _errHandler->reportMatch(this);
            consume();
          }
        }
        break;
      }

      default:
        break;
      }
      break;
    }

    case 3: {
      _localctx = _tracker.createInstance<HogQLParser::JoinOpFullContext>(_localctx);
      enterOuterAlt(_localctx, 3);
      setState(623);
      _errHandler->sync(this);
      switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 74, _ctx)) {
      case 1: {
        setState(610);
        _errHandler->sync(this);

        _la = _input->LA(1);
        if (_la == HogQLParser::ALL

        || _la == HogQLParser::ANY) {
          setState(609);
          _la = _input->LA(1);
          if (!(_la == HogQLParser::ALL

          || _la == HogQLParser::ANY)) {
          _errHandler->recoverInline(this);
          }
          else {
            _errHandler->reportMatch(this);
            consume();
          }
        }
        setState(612);
        match(HogQLParser::FULL);
        setState(614);
        _errHandler->sync(this);

        _la = _input->LA(1);
        if (_la == HogQLParser::OUTER) {
          setState(613);
          match(HogQLParser::OUTER);
        }
        break;
      }

      case 2: {
        setState(616);
        match(HogQLParser::FULL);
        setState(618);
        _errHandler->sync(this);

        _la = _input->LA(1);
        if (_la == HogQLParser::OUTER) {
          setState(617);
          match(HogQLParser::OUTER);
        }
        setState(621);
        _errHandler->sync(this);

        _la = _input->LA(1);
        if (_la == HogQLParser::ALL

        || _la == HogQLParser::ANY) {
          setState(620);
          _la = _input->LA(1);
          if (!(_la == HogQLParser::ALL

          || _la == HogQLParser::ANY)) {
          _errHandler->recoverInline(this);
          }
          else {
            _errHandler->reportMatch(this);
            consume();
          }
        }
        break;
      }

      default:
        break;
      }
      break;
    }

    default:
      break;
    }
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- JoinOpCrossContext ------------------------------------------------------------------

HogQLParser::JoinOpCrossContext::JoinOpCrossContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

tree::TerminalNode* HogQLParser::JoinOpCrossContext::CROSS() {
  return getToken(HogQLParser::CROSS, 0);
}

tree::TerminalNode* HogQLParser::JoinOpCrossContext::JOIN() {
  return getToken(HogQLParser::JOIN, 0);
}

tree::TerminalNode* HogQLParser::JoinOpCrossContext::COMMA() {
  return getToken(HogQLParser::COMMA, 0);
}


size_t HogQLParser::JoinOpCrossContext::getRuleIndex() const {
  return HogQLParser::RuleJoinOpCross;
}


std::any HogQLParser::JoinOpCrossContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
    return parserVisitor->visitJoinOpCross(this);
  else
    return visitor->visitChildren(this);
}

HogQLParser::JoinOpCrossContext* HogQLParser::joinOpCross() {
  JoinOpCrossContext *_localctx = _tracker.createInstance<JoinOpCrossContext>(_ctx, getState());
  enterRule(_localctx, 86, HogQLParser::RuleJoinOpCross);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    setState(630);
    _errHandler->sync(this);
    switch (_input->LA(1)) {
      case HogQLParser::CROSS: {
        enterOuterAlt(_localctx, 1);
        setState(627);
        match(HogQLParser::CROSS);
        setState(628);
        match(HogQLParser::JOIN);
        break;
      }

      case HogQLParser::COMMA: {
        enterOuterAlt(_localctx, 2);
        setState(629);
        match(HogQLParser::COMMA);
        break;
      }

    default:
      throw NoViableAltException(this);
    }
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- JoinConstraintClauseContext ------------------------------------------------------------------

HogQLParser::JoinConstraintClauseContext::JoinConstraintClauseContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

tree::TerminalNode* HogQLParser::JoinConstraintClauseContext::ON() {
  return getToken(HogQLParser::ON, 0);
}

HogQLParser::ColumnExprListContext* HogQLParser::JoinConstraintClauseContext::columnExprList() {
  return getRuleContext<HogQLParser::ColumnExprListContext>(0);
}

tree::TerminalNode* HogQLParser::JoinConstraintClauseContext::USING() {
  return getToken(HogQLParser::USING, 0);
}

tree::TerminalNode* HogQLParser::JoinConstraintClauseContext::LPAREN() {
  return getToken(HogQLParser::LPAREN, 0);
}

tree::TerminalNode* HogQLParser::JoinConstraintClauseContext::RPAREN() {
  return getToken(HogQLParser::RPAREN, 0);
}


size_t HogQLParser::JoinConstraintClauseContext::getRuleIndex() const {
  return HogQLParser::RuleJoinConstraintClause;
}


std::any HogQLParser::JoinConstraintClauseContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
    return parserVisitor->visitJoinConstraintClause(this);
  else
    return visitor->visitChildren(this);
}

HogQLParser::JoinConstraintClauseContext* HogQLParser::joinConstraintClause() {
  JoinConstraintClauseContext *_localctx = _tracker.createInstance<JoinConstraintClauseContext>(_ctx, getState());
  enterRule(_localctx, 88, HogQLParser::RuleJoinConstraintClause);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    setState(641);
    _errHandler->sync(this);
    switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 77, _ctx)) {
    case 1: {
      enterOuterAlt(_localctx, 1);
      setState(632);
      match(HogQLParser::ON);
      setState(633);
      columnExprList();
      break;
    }

    case 2: {
      enterOuterAlt(_localctx, 2);
      setState(634);
      match(HogQLParser::USING);
      setState(635);
      match(HogQLParser::LPAREN);
      setState(636);
      columnExprList();
      setState(637);
      match(HogQLParser::RPAREN);
      break;
    }

    case 3: {
      enterOuterAlt(_localctx, 3);
      setState(639);
      match(HogQLParser::USING);
      setState(640);
      columnExprList();
      break;
    }

    default:
      break;
    }
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- SampleClauseContext ------------------------------------------------------------------

HogQLParser::SampleClauseContext::SampleClauseContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

tree::TerminalNode* HogQLParser::SampleClauseContext::SAMPLE() {
  return getToken(HogQLParser::SAMPLE, 0);
}

std::vector<HogQLParser::RatioExprContext *> HogQLParser::SampleClauseContext::ratioExpr() {
  return getRuleContexts<HogQLParser::RatioExprContext>();
}

HogQLParser::RatioExprContext* HogQLParser::SampleClauseContext::ratioExpr(size_t i) {
  return getRuleContext<HogQLParser::RatioExprContext>(i);
}

tree::TerminalNode* HogQLParser::SampleClauseContext::OFFSET() {
  return getToken(HogQLParser::OFFSET, 0);
}


size_t HogQLParser::SampleClauseContext::getRuleIndex() const {
  return HogQLParser::RuleSampleClause;
}


std::any HogQLParser::SampleClauseContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
    return parserVisitor->visitSampleClause(this);
  else
    return visitor->visitChildren(this);
}

HogQLParser::SampleClauseContext* HogQLParser::sampleClause() {
  SampleClauseContext *_localctx = _tracker.createInstance<SampleClauseContext>(_ctx, getState());
  enterRule(_localctx, 90, HogQLParser::RuleSampleClause);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(643);
    match(HogQLParser::SAMPLE);
    setState(644);
    ratioExpr();
    setState(647);
    _errHandler->sync(this);

    switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 78, _ctx)) {
    case 1: {
      setState(645);
      match(HogQLParser::OFFSET);
      setState(646);
      ratioExpr();
      break;
    }

    default:
      break;
    }
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- LimitExprContext ------------------------------------------------------------------

HogQLParser::LimitExprContext::LimitExprContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

std::vector<HogQLParser::ColumnExprContext *> HogQLParser::LimitExprContext::columnExpr() {
  return getRuleContexts<HogQLParser::ColumnExprContext>();
}

HogQLParser::ColumnExprContext* HogQLParser::LimitExprContext::columnExpr(size_t i) {
  return getRuleContext<HogQLParser::ColumnExprContext>(i);
}

tree::TerminalNode* HogQLParser::LimitExprContext::COMMA() {
  return getToken(HogQLParser::COMMA, 0);
}

tree::TerminalNode* HogQLParser::LimitExprContext::OFFSET() {
  return getToken(HogQLParser::OFFSET, 0);
}


size_t HogQLParser::LimitExprContext::getRuleIndex() const {
  return HogQLParser::RuleLimitExpr;
}


std::any HogQLParser::LimitExprContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
    return parserVisitor->visitLimitExpr(this);
  else
    return visitor->visitChildren(this);
}

HogQLParser::LimitExprContext* HogQLParser::limitExpr() {
  LimitExprContext *_localctx = _tracker.createInstance<LimitExprContext>(_ctx, getState());
  enterRule(_localctx, 92, HogQLParser::RuleLimitExpr);
  size_t _la = 0;

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(649);
    columnExpr(0);
    setState(652);
    _errHandler->sync(this);

    _la = _input->LA(1);
    if (_la == HogQLParser::OFFSET

    || _la == HogQLParser::COMMA) {
      setState(650);
      _la = _input->LA(1);
      if (!(_la == HogQLParser::OFFSET

      || _la == HogQLParser::COMMA)) {
      _errHandler->recoverInline(this);
      }
      else {
        _errHandler->reportMatch(this);
        consume();
      }
      setState(651);
      columnExpr(0);
    }
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- OrderExprListContext ------------------------------------------------------------------

HogQLParser::OrderExprListContext::OrderExprListContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

std::vector<HogQLParser::OrderExprContext *> HogQLParser::OrderExprListContext::orderExpr() {
  return getRuleContexts<HogQLParser::OrderExprContext>();
}

HogQLParser::OrderExprContext* HogQLParser::OrderExprListContext::orderExpr(size_t i) {
  return getRuleContext<HogQLParser::OrderExprContext>(i);
}

std::vector<tree::TerminalNode *> HogQLParser::OrderExprListContext::COMMA() {
  return getTokens(HogQLParser::COMMA);
}

tree::TerminalNode* HogQLParser::OrderExprListContext::COMMA(size_t i) {
  return getToken(HogQLParser::COMMA, i);
}


size_t HogQLParser::OrderExprListContext::getRuleIndex() const {
  return HogQLParser::RuleOrderExprList;
}


std::any HogQLParser::OrderExprListContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
    return parserVisitor->visitOrderExprList(this);
  else
    return visitor->visitChildren(this);
}

HogQLParser::OrderExprListContext* HogQLParser::orderExprList() {
  OrderExprListContext *_localctx = _tracker.createInstance<OrderExprListContext>(_ctx, getState());
  enterRule(_localctx, 94, HogQLParser::RuleOrderExprList);
  size_t _la = 0;

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(654);
    orderExpr();
    setState(659);
    _errHandler->sync(this);
    _la = _input->LA(1);
    while (_la == HogQLParser::COMMA) {
      setState(655);
      match(HogQLParser::COMMA);
      setState(656);
      orderExpr();
      setState(661);
      _errHandler->sync(this);
      _la = _input->LA(1);
    }
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- OrderExprContext ------------------------------------------------------------------

HogQLParser::OrderExprContext::OrderExprContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

HogQLParser::ColumnExprContext* HogQLParser::OrderExprContext::columnExpr() {
  return getRuleContext<HogQLParser::ColumnExprContext>(0);
}

tree::TerminalNode* HogQLParser::OrderExprContext::NULLS() {
  return getToken(HogQLParser::NULLS, 0);
}

tree::TerminalNode* HogQLParser::OrderExprContext::COLLATE() {
  return getToken(HogQLParser::COLLATE, 0);
}

tree::TerminalNode* HogQLParser::OrderExprContext::STRING_LITERAL() {
  return getToken(HogQLParser::STRING_LITERAL, 0);
}

tree::TerminalNode* HogQLParser::OrderExprContext::ASCENDING() {
  return getToken(HogQLParser::ASCENDING, 0);
}

tree::TerminalNode* HogQLParser::OrderExprContext::DESCENDING() {
  return getToken(HogQLParser::DESCENDING, 0);
}

tree::TerminalNode* HogQLParser::OrderExprContext::DESC() {
  return getToken(HogQLParser::DESC, 0);
}

tree::TerminalNode* HogQLParser::OrderExprContext::FIRST() {
  return getToken(HogQLParser::FIRST, 0);
}

tree::TerminalNode* HogQLParser::OrderExprContext::LAST() {
  return getToken(HogQLParser::LAST, 0);
}


size_t HogQLParser::OrderExprContext::getRuleIndex() const {
  return HogQLParser::RuleOrderExpr;
}


std::any HogQLParser::OrderExprContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
    return parserVisitor->visitOrderExpr(this);
  else
    return visitor->visitChildren(this);
}

HogQLParser::OrderExprContext* HogQLParser::orderExpr() {
  OrderExprContext *_localctx = _tracker.createInstance<OrderExprContext>(_ctx, getState());
  enterRule(_localctx, 96, HogQLParser::RuleOrderExpr);
  size_t _la = 0;

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(662);
    columnExpr(0);
    setState(664);
    _errHandler->sync(this);

    _la = _input->LA(1);
    if ((((_la & ~ 0x3fULL) == 0) &&
      ((1ULL << _la) & 12583040) != 0)) {
      setState(663);
      _la = _input->LA(1);
      if (!((((_la & ~ 0x3fULL) == 0) &&
        ((1ULL << _la) & 12583040) != 0))) {
      _errHandler->recoverInline(this);
      }
      else {
        _errHandler->reportMatch(this);
        consume();
      }
    }
    setState(668);
    _errHandler->sync(this);

    _la = _input->LA(1);
    if (_la == HogQLParser::NULLS) {
      setState(666);
      match(HogQLParser::NULLS);
      setState(667);
      _la = _input->LA(1);
      if (!(_la == HogQLParser::FIRST

      || _la == HogQLParser::LAST)) {
      _errHandler->recoverInline(this);
      }
      else {
        _errHandler->reportMatch(this);
        consume();
      }
    }
    setState(672);
    _errHandler->sync(this);

    _la = _input->LA(1);
    if (_la == HogQLParser::COLLATE) {
      setState(670);
      match(HogQLParser::COLLATE);
      setState(671);
      match(HogQLParser::STRING_LITERAL);
    }
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- RatioExprContext ------------------------------------------------------------------

HogQLParser::RatioExprContext::RatioExprContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

HogQLParser::PlaceholderContext* HogQLParser::RatioExprContext::placeholder() {
  return getRuleContext<HogQLParser::PlaceholderContext>(0);
}

std::vector<HogQLParser::NumberLiteralContext *> HogQLParser::RatioExprContext::numberLiteral() {
  return getRuleContexts<HogQLParser::NumberLiteralContext>();
}

HogQLParser::NumberLiteralContext* HogQLParser::RatioExprContext::numberLiteral(size_t i) {
  return getRuleContext<HogQLParser::NumberLiteralContext>(i);
}

tree::TerminalNode* HogQLParser::RatioExprContext::SLASH() {
  return getToken(HogQLParser::SLASH, 0);
}


size_t HogQLParser::RatioExprContext::getRuleIndex() const {
  return HogQLParser::RuleRatioExpr;
}


std::any HogQLParser::RatioExprContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
    return parserVisitor->visitRatioExpr(this);
  else
    return visitor->visitChildren(this);
}

HogQLParser::RatioExprContext* HogQLParser::ratioExpr() {
  RatioExprContext *_localctx = _tracker.createInstance<RatioExprContext>(_ctx, getState());
  enterRule(_localctx, 98, HogQLParser::RuleRatioExpr);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    setState(680);
    _errHandler->sync(this);
    switch (_input->LA(1)) {
      case HogQLParser::LBRACE: {
        enterOuterAlt(_localctx, 1);
        setState(674);
        placeholder();
        break;
      }

      case HogQLParser::INF:
      case HogQLParser::NAN_SQL:
      case HogQLParser::FLOATING_LITERAL:
      case HogQLParser::OCTAL_LITERAL:
      case HogQLParser::DECIMAL_LITERAL:
      case HogQLParser::HEXADECIMAL_LITERAL:
      case HogQLParser::DASH:
      case HogQLParser::DOT:
      case HogQLParser::PLUS: {
        enterOuterAlt(_localctx, 2);
        setState(675);
        numberLiteral();
        setState(678);
        _errHandler->sync(this);

        switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 84, _ctx)) {
        case 1: {
          setState(676);
          match(HogQLParser::SLASH);
          setState(677);
          numberLiteral();
          break;
        }

        default:
          break;
        }
        break;
      }

    default:
      throw NoViableAltException(this);
    }
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- SettingExprListContext ------------------------------------------------------------------

HogQLParser::SettingExprListContext::SettingExprListContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

std::vector<HogQLParser::SettingExprContext *> HogQLParser::SettingExprListContext::settingExpr() {
  return getRuleContexts<HogQLParser::SettingExprContext>();
}

HogQLParser::SettingExprContext* HogQLParser::SettingExprListContext::settingExpr(size_t i) {
  return getRuleContext<HogQLParser::SettingExprContext>(i);
}

std::vector<tree::TerminalNode *> HogQLParser::SettingExprListContext::COMMA() {
  return getTokens(HogQLParser::COMMA);
}

tree::TerminalNode* HogQLParser::SettingExprListContext::COMMA(size_t i) {
  return getToken(HogQLParser::COMMA, i);
}


size_t HogQLParser::SettingExprListContext::getRuleIndex() const {
  return HogQLParser::RuleSettingExprList;
}


std::any HogQLParser::SettingExprListContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
    return parserVisitor->visitSettingExprList(this);
  else
    return visitor->visitChildren(this);
}

HogQLParser::SettingExprListContext* HogQLParser::settingExprList() {
  SettingExprListContext *_localctx = _tracker.createInstance<SettingExprListContext>(_ctx, getState());
  enterRule(_localctx, 100, HogQLParser::RuleSettingExprList);
  size_t _la = 0;

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(682);
    settingExpr();
    setState(687);
    _errHandler->sync(this);
    _la = _input->LA(1);
    while (_la == HogQLParser::COMMA) {
      setState(683);
      match(HogQLParser::COMMA);
      setState(684);
      settingExpr();
      setState(689);
      _errHandler->sync(this);
      _la = _input->LA(1);
    }
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- SettingExprContext ------------------------------------------------------------------

HogQLParser::SettingExprContext::SettingExprContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

HogQLParser::IdentifierContext* HogQLParser::SettingExprContext::identifier() {
  return getRuleContext<HogQLParser::IdentifierContext>(0);
}

tree::TerminalNode* HogQLParser::SettingExprContext::EQ_SINGLE() {
  return getToken(HogQLParser::EQ_SINGLE, 0);
}

HogQLParser::LiteralContext* HogQLParser::SettingExprContext::literal() {
  return getRuleContext<HogQLParser::LiteralContext>(0);
}


size_t HogQLParser::SettingExprContext::getRuleIndex() const {
  return HogQLParser::RuleSettingExpr;
}


std::any HogQLParser::SettingExprContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
    return parserVisitor->visitSettingExpr(this);
  else
    return visitor->visitChildren(this);
}

HogQLParser::SettingExprContext* HogQLParser::settingExpr() {
  SettingExprContext *_localctx = _tracker.createInstance<SettingExprContext>(_ctx, getState());
  enterRule(_localctx, 102, HogQLParser::RuleSettingExpr);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(690);
    identifier();
    setState(691);
    match(HogQLParser::EQ_SINGLE);
    setState(692);
    literal();
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- WindowExprContext ------------------------------------------------------------------

HogQLParser::WindowExprContext::WindowExprContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

HogQLParser::WinPartitionByClauseContext* HogQLParser::WindowExprContext::winPartitionByClause() {
  return getRuleContext<HogQLParser::WinPartitionByClauseContext>(0);
}

HogQLParser::WinOrderByClauseContext* HogQLParser::WindowExprContext::winOrderByClause() {
  return getRuleContext<HogQLParser::WinOrderByClauseContext>(0);
}

HogQLParser::WinFrameClauseContext* HogQLParser::WindowExprContext::winFrameClause() {
  return getRuleContext<HogQLParser::WinFrameClauseContext>(0);
}


size_t HogQLParser::WindowExprContext::getRuleIndex() const {
  return HogQLParser::RuleWindowExpr;
}


std::any HogQLParser::WindowExprContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
    return parserVisitor->visitWindowExpr(this);
  else
    return visitor->visitChildren(this);
}

HogQLParser::WindowExprContext* HogQLParser::windowExpr() {
  WindowExprContext *_localctx = _tracker.createInstance<WindowExprContext>(_ctx, getState());
  enterRule(_localctx, 104, HogQLParser::RuleWindowExpr);
  size_t _la = 0;

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(695);
    _errHandler->sync(this);

    _la = _input->LA(1);
    if (_la == HogQLParser::PARTITION) {
      setState(694);
      winPartitionByClause();
    }
    setState(698);
    _errHandler->sync(this);

    _la = _input->LA(1);
    if (_la == HogQLParser::ORDER) {
      setState(697);
      winOrderByClause();
    }
    setState(701);
    _errHandler->sync(this);

    _la = _input->LA(1);
    if (_la == HogQLParser::RANGE

    || _la == HogQLParser::ROWS) {
      setState(700);
      winFrameClause();
    }
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- WinPartitionByClauseContext ------------------------------------------------------------------

HogQLParser::WinPartitionByClauseContext::WinPartitionByClauseContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

tree::TerminalNode* HogQLParser::WinPartitionByClauseContext::PARTITION() {
  return getToken(HogQLParser::PARTITION, 0);
}

tree::TerminalNode* HogQLParser::WinPartitionByClauseContext::BY() {
  return getToken(HogQLParser::BY, 0);
}

HogQLParser::ColumnExprListContext* HogQLParser::WinPartitionByClauseContext::columnExprList() {
  return getRuleContext<HogQLParser::ColumnExprListContext>(0);
}


size_t HogQLParser::WinPartitionByClauseContext::getRuleIndex() const {
  return HogQLParser::RuleWinPartitionByClause;
}


std::any HogQLParser::WinPartitionByClauseContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
    return parserVisitor->visitWinPartitionByClause(this);
  else
    return visitor->visitChildren(this);
}

HogQLParser::WinPartitionByClauseContext* HogQLParser::winPartitionByClause() {
  WinPartitionByClauseContext *_localctx = _tracker.createInstance<WinPartitionByClauseContext>(_ctx, getState());
  enterRule(_localctx, 106, HogQLParser::RuleWinPartitionByClause);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(703);
    match(HogQLParser::PARTITION);
    setState(704);
    match(HogQLParser::BY);
    setState(705);
    columnExprList();
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- WinOrderByClauseContext ------------------------------------------------------------------

HogQLParser::WinOrderByClauseContext::WinOrderByClauseContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

tree::TerminalNode* HogQLParser::WinOrderByClauseContext::ORDER() {
  return getToken(HogQLParser::ORDER, 0);
}

tree::TerminalNode* HogQLParser::WinOrderByClauseContext::BY() {
  return getToken(HogQLParser::BY, 0);
}

HogQLParser::OrderExprListContext* HogQLParser::WinOrderByClauseContext::orderExprList() {
  return getRuleContext<HogQLParser::OrderExprListContext>(0);
}


size_t HogQLParser::WinOrderByClauseContext::getRuleIndex() const {
  return HogQLParser::RuleWinOrderByClause;
}


std::any HogQLParser::WinOrderByClauseContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
    return parserVisitor->visitWinOrderByClause(this);
  else
    return visitor->visitChildren(this);
}

HogQLParser::WinOrderByClauseContext* HogQLParser::winOrderByClause() {
  WinOrderByClauseContext *_localctx = _tracker.createInstance<WinOrderByClauseContext>(_ctx, getState());
  enterRule(_localctx, 108, HogQLParser::RuleWinOrderByClause);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(707);
    match(HogQLParser::ORDER);
    setState(708);
    match(HogQLParser::BY);
    setState(709);
    orderExprList();
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- WinFrameClauseContext ------------------------------------------------------------------

HogQLParser::WinFrameClauseContext::WinFrameClauseContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

HogQLParser::WinFrameExtendContext* HogQLParser::WinFrameClauseContext::winFrameExtend() {
  return getRuleContext<HogQLParser::WinFrameExtendContext>(0);
}

tree::TerminalNode* HogQLParser::WinFrameClauseContext::ROWS() {
  return getToken(HogQLParser::ROWS, 0);
}

tree::TerminalNode* HogQLParser::WinFrameClauseContext::RANGE() {
  return getToken(HogQLParser::RANGE, 0);
}


size_t HogQLParser::WinFrameClauseContext::getRuleIndex() const {
  return HogQLParser::RuleWinFrameClause;
}


std::any HogQLParser::WinFrameClauseContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
    return parserVisitor->visitWinFrameClause(this);
  else
    return visitor->visitChildren(this);
}

HogQLParser::WinFrameClauseContext* HogQLParser::winFrameClause() {
  WinFrameClauseContext *_localctx = _tracker.createInstance<WinFrameClauseContext>(_ctx, getState());
  enterRule(_localctx, 110, HogQLParser::RuleWinFrameClause);
  size_t _la = 0;

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(711);
    _la = _input->LA(1);
    if (!(_la == HogQLParser::RANGE

    || _la == HogQLParser::ROWS)) {
    _errHandler->recoverInline(this);
    }
    else {
      _errHandler->reportMatch(this);
      consume();
    }
    setState(712);
    winFrameExtend();
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- WinFrameExtendContext ------------------------------------------------------------------

HogQLParser::WinFrameExtendContext::WinFrameExtendContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}


size_t HogQLParser::WinFrameExtendContext::getRuleIndex() const {
  return HogQLParser::RuleWinFrameExtend;
}

void HogQLParser::WinFrameExtendContext::copyFrom(WinFrameExtendContext *ctx) {
  ParserRuleContext::copyFrom(ctx);
}

//----------------- FrameStartContext ------------------------------------------------------------------

HogQLParser::WinFrameBoundContext* HogQLParser::FrameStartContext::winFrameBound() {
  return getRuleContext<HogQLParser::WinFrameBoundContext>(0);
}

HogQLParser::FrameStartContext::FrameStartContext(WinFrameExtendContext *ctx) { copyFrom(ctx); }


std::any HogQLParser::FrameStartContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
    return parserVisitor->visitFrameStart(this);
  else
    return visitor->visitChildren(this);
}
//----------------- FrameBetweenContext ------------------------------------------------------------------

tree::TerminalNode* HogQLParser::FrameBetweenContext::BETWEEN() {
  return getToken(HogQLParser::BETWEEN, 0);
}

std::vector<HogQLParser::WinFrameBoundContext *> HogQLParser::FrameBetweenContext::winFrameBound() {
  return getRuleContexts<HogQLParser::WinFrameBoundContext>();
}

HogQLParser::WinFrameBoundContext* HogQLParser::FrameBetweenContext::winFrameBound(size_t i) {
  return getRuleContext<HogQLParser::WinFrameBoundContext>(i);
}

tree::TerminalNode* HogQLParser::FrameBetweenContext::AND() {
  return getToken(HogQLParser::AND, 0);
}

HogQLParser::FrameBetweenContext::FrameBetweenContext(WinFrameExtendContext *ctx) { copyFrom(ctx); }


std::any HogQLParser::FrameBetweenContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
    return parserVisitor->visitFrameBetween(this);
  else
    return visitor->visitChildren(this);
}
HogQLParser::WinFrameExtendContext* HogQLParser::winFrameExtend() {
  WinFrameExtendContext *_localctx = _tracker.createInstance<WinFrameExtendContext>(_ctx, getState());
  enterRule(_localctx, 112, HogQLParser::RuleWinFrameExtend);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    setState(720);
    _errHandler->sync(this);
    switch (_input->LA(1)) {
      case HogQLParser::CURRENT:
      case HogQLParser::INF:
      case HogQLParser::NAN_SQL:
      case HogQLParser::UNBOUNDED:
      case HogQLParser::FLOATING_LITERAL:
      case HogQLParser::OCTAL_LITERAL:
      case HogQLParser::DECIMAL_LITERAL:
      case HogQLParser::HEXADECIMAL_LITERAL:
      case HogQLParser::DASH:
      case HogQLParser::DOT:
      case HogQLParser::PLUS: {
        _localctx = _tracker.createInstance<HogQLParser::FrameStartContext>(_localctx);
        enterOuterAlt(_localctx, 1);
        setState(714);
        winFrameBound();
        break;
      }

      case HogQLParser::BETWEEN: {
        _localctx = _tracker.createInstance<HogQLParser::FrameBetweenContext>(_localctx);
        enterOuterAlt(_localctx, 2);
        setState(715);
        match(HogQLParser::BETWEEN);
        setState(716);
        winFrameBound();
        setState(717);
        match(HogQLParser::AND);
        setState(718);
        winFrameBound();
        break;
      }

    default:
      throw NoViableAltException(this);
    }
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- WinFrameBoundContext ------------------------------------------------------------------

HogQLParser::WinFrameBoundContext::WinFrameBoundContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

tree::TerminalNode* HogQLParser::WinFrameBoundContext::CURRENT() {
  return getToken(HogQLParser::CURRENT, 0);
}

tree::TerminalNode* HogQLParser::WinFrameBoundContext::ROW() {
  return getToken(HogQLParser::ROW, 0);
}

tree::TerminalNode* HogQLParser::WinFrameBoundContext::UNBOUNDED() {
  return getToken(HogQLParser::UNBOUNDED, 0);
}

tree::TerminalNode* HogQLParser::WinFrameBoundContext::PRECEDING() {
  return getToken(HogQLParser::PRECEDING, 0);
}

tree::TerminalNode* HogQLParser::WinFrameBoundContext::FOLLOWING() {
  return getToken(HogQLParser::FOLLOWING, 0);
}

HogQLParser::NumberLiteralContext* HogQLParser::WinFrameBoundContext::numberLiteral() {
  return getRuleContext<HogQLParser::NumberLiteralContext>(0);
}


size_t HogQLParser::WinFrameBoundContext::getRuleIndex() const {
  return HogQLParser::RuleWinFrameBound;
}


std::any HogQLParser::WinFrameBoundContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
    return parserVisitor->visitWinFrameBound(this);
  else
    return visitor->visitChildren(this);
}

HogQLParser::WinFrameBoundContext* HogQLParser::winFrameBound() {
  WinFrameBoundContext *_localctx = _tracker.createInstance<WinFrameBoundContext>(_ctx, getState());
  enterRule(_localctx, 114, HogQLParser::RuleWinFrameBound);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(734);
    _errHandler->sync(this);
    switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 91, _ctx)) {
    case 1: {
      setState(722);
      match(HogQLParser::CURRENT);
      setState(723);
      match(HogQLParser::ROW);
      break;
    }

    case 2: {
      setState(724);
      match(HogQLParser::UNBOUNDED);
      setState(725);
      match(HogQLParser::PRECEDING);
      break;
    }

    case 3: {
      setState(726);
      match(HogQLParser::UNBOUNDED);
      setState(727);
      match(HogQLParser::FOLLOWING);
      break;
    }

    case 4: {
      setState(728);
      numberLiteral();
      setState(729);
      match(HogQLParser::PRECEDING);
      break;
    }

    case 5: {
      setState(731);
      numberLiteral();
      setState(732);
      match(HogQLParser::FOLLOWING);
      break;
    }

    default:
      break;
    }
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- ExprContext ------------------------------------------------------------------

HogQLParser::ExprContext::ExprContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

HogQLParser::ColumnExprContext* HogQLParser::ExprContext::columnExpr() {
  return getRuleContext<HogQLParser::ColumnExprContext>(0);
}

tree::TerminalNode* HogQLParser::ExprContext::EOF() {
  return getToken(HogQLParser::EOF, 0);
}


size_t HogQLParser::ExprContext::getRuleIndex() const {
  return HogQLParser::RuleExpr;
}


std::any HogQLParser::ExprContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
    return parserVisitor->visitExpr(this);
  else
    return visitor->visitChildren(this);
}

HogQLParser::ExprContext* HogQLParser::expr() {
  ExprContext *_localctx = _tracker.createInstance<ExprContext>(_ctx, getState());
  enterRule(_localctx, 116, HogQLParser::RuleExpr);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(736);
    columnExpr(0);
    setState(737);
    match(HogQLParser::EOF);
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- ColumnTypeExprContext ------------------------------------------------------------------

HogQLParser::ColumnTypeExprContext::ColumnTypeExprContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}


size_t HogQLParser::ColumnTypeExprContext::getRuleIndex() const {
  return HogQLParser::RuleColumnTypeExpr;
}

void HogQLParser::ColumnTypeExprContext::copyFrom(ColumnTypeExprContext *ctx) {
  ParserRuleContext::copyFrom(ctx);
}

//----------------- ColumnTypeExprNestedContext ------------------------------------------------------------------

std::vector<HogQLParser::IdentifierContext *> HogQLParser::ColumnTypeExprNestedContext::identifier() {
  return getRuleContexts<HogQLParser::IdentifierContext>();
}

HogQLParser::IdentifierContext* HogQLParser::ColumnTypeExprNestedContext::identifier(size_t i) {
  return getRuleContext<HogQLParser::IdentifierContext>(i);
}

tree::TerminalNode* HogQLParser::ColumnTypeExprNestedContext::LPAREN() {
  return getToken(HogQLParser::LPAREN, 0);
}

std::vector<HogQLParser::ColumnTypeExprContext *> HogQLParser::ColumnTypeExprNestedContext::columnTypeExpr() {
  return getRuleContexts<HogQLParser::ColumnTypeExprContext>();
}

HogQLParser::ColumnTypeExprContext* HogQLParser::ColumnTypeExprNestedContext::columnTypeExpr(size_t i) {
  return getRuleContext<HogQLParser::ColumnTypeExprContext>(i);
}

tree::TerminalNode* HogQLParser::ColumnTypeExprNestedContext::RPAREN() {
  return getToken(HogQLParser::RPAREN, 0);
}

std::vector<tree::TerminalNode *> HogQLParser::ColumnTypeExprNestedContext::COMMA() {
  return getTokens(HogQLParser::COMMA);
}

tree::TerminalNode* HogQLParser::ColumnTypeExprNestedContext::COMMA(size_t i) {
  return getToken(HogQLParser::COMMA, i);
}

HogQLParser::ColumnTypeExprNestedContext::ColumnTypeExprNestedContext(ColumnTypeExprContext *ctx) { copyFrom(ctx); }


std::any HogQLParser::ColumnTypeExprNestedContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
    return parserVisitor->visitColumnTypeExprNested(this);
  else
    return visitor->visitChildren(this);
}
//----------------- ColumnTypeExprParamContext ------------------------------------------------------------------

HogQLParser::IdentifierContext* HogQLParser::ColumnTypeExprParamContext::identifier() {
  return getRuleContext<HogQLParser::IdentifierContext>(0);
}

tree::TerminalNode* HogQLParser::ColumnTypeExprParamContext::LPAREN() {
  return getToken(HogQLParser::LPAREN, 0);
}

tree::TerminalNode* HogQLParser::ColumnTypeExprParamContext::RPAREN() {
  return getToken(HogQLParser::RPAREN, 0);
}

HogQLParser::ColumnExprListContext* HogQLParser::ColumnTypeExprParamContext::columnExprList() {
  return getRuleContext<HogQLParser::ColumnExprListContext>(0);
}

HogQLParser::ColumnTypeExprParamContext::ColumnTypeExprParamContext(ColumnTypeExprContext *ctx) { copyFrom(ctx); }


std::any HogQLParser::ColumnTypeExprParamContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
    return parserVisitor->visitColumnTypeExprParam(this);
  else
    return visitor->visitChildren(this);
}
//----------------- ColumnTypeExprSimpleContext ------------------------------------------------------------------

HogQLParser::IdentifierContext* HogQLParser::ColumnTypeExprSimpleContext::identifier() {
  return getRuleContext<HogQLParser::IdentifierContext>(0);
}

HogQLParser::ColumnTypeExprSimpleContext::ColumnTypeExprSimpleContext(ColumnTypeExprContext *ctx) { copyFrom(ctx); }


std::any HogQLParser::ColumnTypeExprSimpleContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
    return parserVisitor->visitColumnTypeExprSimple(this);
  else
    return visitor->visitChildren(this);
}
//----------------- ColumnTypeExprComplexContext ------------------------------------------------------------------

HogQLParser::IdentifierContext* HogQLParser::ColumnTypeExprComplexContext::identifier() {
  return getRuleContext<HogQLParser::IdentifierContext>(0);
}

tree::TerminalNode* HogQLParser::ColumnTypeExprComplexContext::LPAREN() {
  return getToken(HogQLParser::LPAREN, 0);
}

std::vector<HogQLParser::ColumnTypeExprContext *> HogQLParser::ColumnTypeExprComplexContext::columnTypeExpr() {
  return getRuleContexts<HogQLParser::ColumnTypeExprContext>();
}

HogQLParser::ColumnTypeExprContext* HogQLParser::ColumnTypeExprComplexContext::columnTypeExpr(size_t i) {
  return getRuleContext<HogQLParser::ColumnTypeExprContext>(i);
}

tree::TerminalNode* HogQLParser::ColumnTypeExprComplexContext::RPAREN() {
  return getToken(HogQLParser::RPAREN, 0);
}

std::vector<tree::TerminalNode *> HogQLParser::ColumnTypeExprComplexContext::COMMA() {
  return getTokens(HogQLParser::COMMA);
}

tree::TerminalNode* HogQLParser::ColumnTypeExprComplexContext::COMMA(size_t i) {
  return getToken(HogQLParser::COMMA, i);
}

HogQLParser::ColumnTypeExprComplexContext::ColumnTypeExprComplexContext(ColumnTypeExprContext *ctx) { copyFrom(ctx); }


std::any HogQLParser::ColumnTypeExprComplexContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
    return parserVisitor->visitColumnTypeExprComplex(this);
  else
    return visitor->visitChildren(this);
}
//----------------- ColumnTypeExprEnumContext ------------------------------------------------------------------

HogQLParser::IdentifierContext* HogQLParser::ColumnTypeExprEnumContext::identifier() {
  return getRuleContext<HogQLParser::IdentifierContext>(0);
}

tree::TerminalNode* HogQLParser::ColumnTypeExprEnumContext::LPAREN() {
  return getToken(HogQLParser::LPAREN, 0);
}

std::vector<HogQLParser::EnumValueContext *> HogQLParser::ColumnTypeExprEnumContext::enumValue() {
  return getRuleContexts<HogQLParser::EnumValueContext>();
}

HogQLParser::EnumValueContext* HogQLParser::ColumnTypeExprEnumContext::enumValue(size_t i) {
  return getRuleContext<HogQLParser::EnumValueContext>(i);
}

tree::TerminalNode* HogQLParser::ColumnTypeExprEnumContext::RPAREN() {
  return getToken(HogQLParser::RPAREN, 0);
}

std::vector<tree::TerminalNode *> HogQLParser::ColumnTypeExprEnumContext::COMMA() {
  return getTokens(HogQLParser::COMMA);
}

tree::TerminalNode* HogQLParser::ColumnTypeExprEnumContext::COMMA(size_t i) {
  return getToken(HogQLParser::COMMA, i);
}

HogQLParser::ColumnTypeExprEnumContext::ColumnTypeExprEnumContext(ColumnTypeExprContext *ctx) { copyFrom(ctx); }


std::any HogQLParser::ColumnTypeExprEnumContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
    return parserVisitor->visitColumnTypeExprEnum(this);
  else
    return visitor->visitChildren(this);
}
HogQLParser::ColumnTypeExprContext* HogQLParser::columnTypeExpr() {
  ColumnTypeExprContext *_localctx = _tracker.createInstance<ColumnTypeExprContext>(_ctx, getState());
  enterRule(_localctx, 118, HogQLParser::RuleColumnTypeExpr);
  size_t _la = 0;

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    size_t alt;
    setState(795);
    _errHandler->sync(this);
    switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 99, _ctx)) {
    case 1: {
      _localctx = _tracker.createInstance<HogQLParser::ColumnTypeExprSimpleContext>(_localctx);
      enterOuterAlt(_localctx, 1);
      setState(739);
      identifier();
      break;
    }

    case 2: {
      _localctx = _tracker.createInstance<HogQLParser::ColumnTypeExprNestedContext>(_localctx);
      enterOuterAlt(_localctx, 2);
      setState(740);
      identifier();
      setState(741);
      match(HogQLParser::LPAREN);
      setState(742);
      identifier();
      setState(743);
      columnTypeExpr();
      setState(750);
      _errHandler->sync(this);
      alt = getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 92, _ctx);
      while (alt != 2 && alt != atn::ATN::INVALID_ALT_NUMBER) {
        if (alt == 1) {
          setState(744);
          match(HogQLParser::COMMA);
          setState(745);
          identifier();
          setState(746);
          columnTypeExpr(); 
        }
        setState(752);
        _errHandler->sync(this);
        alt = getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 92, _ctx);
      }
      setState(754);
      _errHandler->sync(this);

      _la = _input->LA(1);
      if (_la == HogQLParser::COMMA) {
        setState(753);
        match(HogQLParser::COMMA);
      }
      setState(756);
      match(HogQLParser::RPAREN);
      break;
    }

    case 3: {
      _localctx = _tracker.createInstance<HogQLParser::ColumnTypeExprEnumContext>(_localctx);
      enterOuterAlt(_localctx, 3);
      setState(758);
      identifier();
      setState(759);
      match(HogQLParser::LPAREN);
      setState(760);
      enumValue();
      setState(765);
      _errHandler->sync(this);
      alt = getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 94, _ctx);
      while (alt != 2 && alt != atn::ATN::INVALID_ALT_NUMBER) {
        if (alt == 1) {
          setState(761);
          match(HogQLParser::COMMA);
          setState(762);
          enumValue(); 
        }
        setState(767);
        _errHandler->sync(this);
        alt = getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 94, _ctx);
      }
      setState(769);
      _errHandler->sync(this);

      _la = _input->LA(1);
      if (_la == HogQLParser::COMMA) {
        setState(768);
        match(HogQLParser::COMMA);
      }
      setState(771);
      match(HogQLParser::RPAREN);
      break;
    }

    case 4: {
      _localctx = _tracker.createInstance<HogQLParser::ColumnTypeExprComplexContext>(_localctx);
      enterOuterAlt(_localctx, 4);
      setState(773);
      identifier();
      setState(774);
      match(HogQLParser::LPAREN);
      setState(775);
      columnTypeExpr();
      setState(780);
      _errHandler->sync(this);
      alt = getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 96, _ctx);
      while (alt != 2 && alt != atn::ATN::INVALID_ALT_NUMBER) {
        if (alt == 1) {
          setState(776);
          match(HogQLParser::COMMA);
          setState(777);
          columnTypeExpr(); 
        }
        setState(782);
        _errHandler->sync(this);
        alt = getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 96, _ctx);
      }
      setState(784);
      _errHandler->sync(this);

      _la = _input->LA(1);
      if (_la == HogQLParser::COMMA) {
        setState(783);
        match(HogQLParser::COMMA);
      }
      setState(786);
      match(HogQLParser::RPAREN);
      break;
    }

    case 5: {
      _localctx = _tracker.createInstance<HogQLParser::ColumnTypeExprParamContext>(_localctx);
      enterOuterAlt(_localctx, 5);
      setState(788);
      identifier();
      setState(789);
      match(HogQLParser::LPAREN);
      setState(791);
      _errHandler->sync(this);

      _la = _input->LA(1);
      if ((((_la & ~ 0x3fULL) == 0) &&
        ((1ULL << _la) & -36169677449216002) != 0) || ((((_la - 64) & ~ 0x3fULL) == 0) &&
        ((1ULL << (_la - 64)) & 723944289947615231) != 0) || ((((_la - 131) & ~ 0x3fULL) == 0) &&
        ((1ULL << (_la - 131)) & 36887) != 0)) {
        setState(790);
        columnExprList();
      }
      setState(793);
      match(HogQLParser::RPAREN);
      break;
    }

    default:
      break;
    }
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- ColumnExprListContext ------------------------------------------------------------------

HogQLParser::ColumnExprListContext::ColumnExprListContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

std::vector<HogQLParser::ColumnExprContext *> HogQLParser::ColumnExprListContext::columnExpr() {
  return getRuleContexts<HogQLParser::ColumnExprContext>();
}

HogQLParser::ColumnExprContext* HogQLParser::ColumnExprListContext::columnExpr(size_t i) {
  return getRuleContext<HogQLParser::ColumnExprContext>(i);
}

std::vector<tree::TerminalNode *> HogQLParser::ColumnExprListContext::COMMA() {
  return getTokens(HogQLParser::COMMA);
}

tree::TerminalNode* HogQLParser::ColumnExprListContext::COMMA(size_t i) {
  return getToken(HogQLParser::COMMA, i);
}


size_t HogQLParser::ColumnExprListContext::getRuleIndex() const {
  return HogQLParser::RuleColumnExprList;
}


std::any HogQLParser::ColumnExprListContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
    return parserVisitor->visitColumnExprList(this);
  else
    return visitor->visitChildren(this);
}

HogQLParser::ColumnExprListContext* HogQLParser::columnExprList() {
  ColumnExprListContext *_localctx = _tracker.createInstance<ColumnExprListContext>(_ctx, getState());
  enterRule(_localctx, 120, HogQLParser::RuleColumnExprList);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    size_t alt;
    enterOuterAlt(_localctx, 1);
    setState(797);
    columnExpr(0);
    setState(802);
    _errHandler->sync(this);
    alt = getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 100, _ctx);
    while (alt != 2 && alt != atn::ATN::INVALID_ALT_NUMBER) {
      if (alt == 1) {
        setState(798);
        match(HogQLParser::COMMA);
        setState(799);
        columnExpr(0); 
      }
      setState(804);
      _errHandler->sync(this);
      alt = getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 100, _ctx);
    }
    setState(806);
    _errHandler->sync(this);

    switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 101, _ctx)) {
    case 1: {
      setState(805);
      match(HogQLParser::COMMA);
      break;
    }

    default:
      break;
    }
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- ColumnExprContext ------------------------------------------------------------------

HogQLParser::ColumnExprContext::ColumnExprContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}


size_t HogQLParser::ColumnExprContext::getRuleIndex() const {
  return HogQLParser::RuleColumnExpr;
}

void HogQLParser::ColumnExprContext::copyFrom(ColumnExprContext *ctx) {
  ParserRuleContext::copyFrom(ctx);
}

//----------------- ColumnExprTernaryOpContext ------------------------------------------------------------------

std::vector<HogQLParser::ColumnExprContext *> HogQLParser::ColumnExprTernaryOpContext::columnExpr() {
  return getRuleContexts<HogQLParser::ColumnExprContext>();
}

HogQLParser::ColumnExprContext* HogQLParser::ColumnExprTernaryOpContext::columnExpr(size_t i) {
  return getRuleContext<HogQLParser::ColumnExprContext>(i);
}

tree::TerminalNode* HogQLParser::ColumnExprTernaryOpContext::QUERY() {
  return getToken(HogQLParser::QUERY, 0);
}

tree::TerminalNode* HogQLParser::ColumnExprTernaryOpContext::COLON() {
  return getToken(HogQLParser::COLON, 0);
}

HogQLParser::ColumnExprTernaryOpContext::ColumnExprTernaryOpContext(ColumnExprContext *ctx) { copyFrom(ctx); }


std::any HogQLParser::ColumnExprTernaryOpContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
    return parserVisitor->visitColumnExprTernaryOp(this);
  else
    return visitor->visitChildren(this);
}
//----------------- ColumnExprAliasContext ------------------------------------------------------------------

HogQLParser::ColumnExprContext* HogQLParser::ColumnExprAliasContext::columnExpr() {
  return getRuleContext<HogQLParser::ColumnExprContext>(0);
}

tree::TerminalNode* HogQLParser::ColumnExprAliasContext::AS() {
  return getToken(HogQLParser::AS, 0);
}

HogQLParser::IdentifierContext* HogQLParser::ColumnExprAliasContext::identifier() {
  return getRuleContext<HogQLParser::IdentifierContext>(0);
}

tree::TerminalNode* HogQLParser::ColumnExprAliasContext::STRING_LITERAL() {
  return getToken(HogQLParser::STRING_LITERAL, 0);
}

HogQLParser::ColumnExprAliasContext::ColumnExprAliasContext(ColumnExprContext *ctx) { copyFrom(ctx); }


std::any HogQLParser::ColumnExprAliasContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
    return parserVisitor->visitColumnExprAlias(this);
  else
    return visitor->visitChildren(this);
}
//----------------- ColumnExprNegateContext ------------------------------------------------------------------

tree::TerminalNode* HogQLParser::ColumnExprNegateContext::DASH() {
  return getToken(HogQLParser::DASH, 0);
}

HogQLParser::ColumnExprContext* HogQLParser::ColumnExprNegateContext::columnExpr() {
  return getRuleContext<HogQLParser::ColumnExprContext>(0);
}

HogQLParser::ColumnExprNegateContext::ColumnExprNegateContext(ColumnExprContext *ctx) { copyFrom(ctx); }


std::any HogQLParser::ColumnExprNegateContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
    return parserVisitor->visitColumnExprNegate(this);
  else
    return visitor->visitChildren(this);
}
//----------------- ColumnExprDictContext ------------------------------------------------------------------

tree::TerminalNode* HogQLParser::ColumnExprDictContext::LBRACE() {
  return getToken(HogQLParser::LBRACE, 0);
}

tree::TerminalNode* HogQLParser::ColumnExprDictContext::RBRACE() {
  return getToken(HogQLParser::RBRACE, 0);
}

HogQLParser::KvPairListContext* HogQLParser::ColumnExprDictContext::kvPairList() {
  return getRuleContext<HogQLParser::KvPairListContext>(0);
}

HogQLParser::ColumnExprDictContext::ColumnExprDictContext(ColumnExprContext *ctx) { copyFrom(ctx); }


std::any HogQLParser::ColumnExprDictContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
    return parserVisitor->visitColumnExprDict(this);
  else
    return visitor->visitChildren(this);
}
//----------------- ColumnExprSubqueryContext ------------------------------------------------------------------

tree::TerminalNode* HogQLParser::ColumnExprSubqueryContext::LPAREN() {
  return getToken(HogQLParser::LPAREN, 0);
}

HogQLParser::SelectSetStmtContext* HogQLParser::ColumnExprSubqueryContext::selectSetStmt() {
  return getRuleContext<HogQLParser::SelectSetStmtContext>(0);
}

tree::TerminalNode* HogQLParser::ColumnExprSubqueryContext::RPAREN() {
  return getToken(HogQLParser::RPAREN, 0);
}

HogQLParser::ColumnExprSubqueryContext::ColumnExprSubqueryContext(ColumnExprContext *ctx) { copyFrom(ctx); }


std::any HogQLParser::ColumnExprSubqueryContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
    return parserVisitor->visitColumnExprSubquery(this);
  else
    return visitor->visitChildren(this);
}
//----------------- ColumnExprLiteralContext ------------------------------------------------------------------

HogQLParser::LiteralContext* HogQLParser::ColumnExprLiteralContext::literal() {
  return getRuleContext<HogQLParser::LiteralContext>(0);
}

HogQLParser::ColumnExprLiteralContext::ColumnExprLiteralContext(ColumnExprContext *ctx) { copyFrom(ctx); }


std::any HogQLParser::ColumnExprLiteralContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
    return parserVisitor->visitColumnExprLiteral(this);
  else
    return visitor->visitChildren(this);
}
//----------------- ColumnExprArrayContext ------------------------------------------------------------------

tree::TerminalNode* HogQLParser::ColumnExprArrayContext::LBRACKET() {
  return getToken(HogQLParser::LBRACKET, 0);
}

tree::TerminalNode* HogQLParser::ColumnExprArrayContext::RBRACKET() {
  return getToken(HogQLParser::RBRACKET, 0);
}

HogQLParser::ColumnExprListContext* HogQLParser::ColumnExprArrayContext::columnExprList() {
  return getRuleContext<HogQLParser::ColumnExprListContext>(0);
}

HogQLParser::ColumnExprArrayContext::ColumnExprArrayContext(ColumnExprContext *ctx) { copyFrom(ctx); }


std::any HogQLParser::ColumnExprArrayContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
    return parserVisitor->visitColumnExprArray(this);
  else
    return visitor->visitChildren(this);
}
//----------------- ColumnExprSubstringContext ------------------------------------------------------------------

tree::TerminalNode* HogQLParser::ColumnExprSubstringContext::SUBSTRING() {
  return getToken(HogQLParser::SUBSTRING, 0);
}

tree::TerminalNode* HogQLParser::ColumnExprSubstringContext::LPAREN() {
  return getToken(HogQLParser::LPAREN, 0);
}

std::vector<HogQLParser::ColumnExprContext *> HogQLParser::ColumnExprSubstringContext::columnExpr() {
  return getRuleContexts<HogQLParser::ColumnExprContext>();
}

HogQLParser::ColumnExprContext* HogQLParser::ColumnExprSubstringContext::columnExpr(size_t i) {
  return getRuleContext<HogQLParser::ColumnExprContext>(i);
}

tree::TerminalNode* HogQLParser::ColumnExprSubstringContext::FROM() {
  return getToken(HogQLParser::FROM, 0);
}

tree::TerminalNode* HogQLParser::ColumnExprSubstringContext::RPAREN() {
  return getToken(HogQLParser::RPAREN, 0);
}

tree::TerminalNode* HogQLParser::ColumnExprSubstringContext::FOR() {
  return getToken(HogQLParser::FOR, 0);
}

HogQLParser::ColumnExprSubstringContext::ColumnExprSubstringContext(ColumnExprContext *ctx) { copyFrom(ctx); }


std::any HogQLParser::ColumnExprSubstringContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
    return parserVisitor->visitColumnExprSubstring(this);
  else
    return visitor->visitChildren(this);
}
//----------------- ColumnExprCastContext ------------------------------------------------------------------

tree::TerminalNode* HogQLParser::ColumnExprCastContext::CAST() {
  return getToken(HogQLParser::CAST, 0);
}

tree::TerminalNode* HogQLParser::ColumnExprCastContext::LPAREN() {
  return getToken(HogQLParser::LPAREN, 0);
}

HogQLParser::ColumnExprContext* HogQLParser::ColumnExprCastContext::columnExpr() {
  return getRuleContext<HogQLParser::ColumnExprContext>(0);
}

tree::TerminalNode* HogQLParser::ColumnExprCastContext::AS() {
  return getToken(HogQLParser::AS, 0);
}

HogQLParser::ColumnTypeExprContext* HogQLParser::ColumnExprCastContext::columnTypeExpr() {
  return getRuleContext<HogQLParser::ColumnTypeExprContext>(0);
}

tree::TerminalNode* HogQLParser::ColumnExprCastContext::RPAREN() {
  return getToken(HogQLParser::RPAREN, 0);
}

HogQLParser::ColumnExprCastContext::ColumnExprCastContext(ColumnExprContext *ctx) { copyFrom(ctx); }


std::any HogQLParser::ColumnExprCastContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
    return parserVisitor->visitColumnExprCast(this);
  else
    return visitor->visitChildren(this);
}
//----------------- ColumnExprOrContext ------------------------------------------------------------------

std::vector<HogQLParser::ColumnExprContext *> HogQLParser::ColumnExprOrContext::columnExpr() {
  return getRuleContexts<HogQLParser::ColumnExprContext>();
}

HogQLParser::ColumnExprContext* HogQLParser::ColumnExprOrContext::columnExpr(size_t i) {
  return getRuleContext<HogQLParser::ColumnExprContext>(i);
}

tree::TerminalNode* HogQLParser::ColumnExprOrContext::OR() {
  return getToken(HogQLParser::OR, 0);
}

HogQLParser::ColumnExprOrContext::ColumnExprOrContext(ColumnExprContext *ctx) { copyFrom(ctx); }


std::any HogQLParser::ColumnExprOrContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
    return parserVisitor->visitColumnExprOr(this);
  else
    return visitor->visitChildren(this);
}
//----------------- ColumnExprNullTupleAccessContext ------------------------------------------------------------------

HogQLParser::ColumnExprContext* HogQLParser::ColumnExprNullTupleAccessContext::columnExpr() {
  return getRuleContext<HogQLParser::ColumnExprContext>(0);
}

tree::TerminalNode* HogQLParser::ColumnExprNullTupleAccessContext::NULL_PROPERTY() {
  return getToken(HogQLParser::NULL_PROPERTY, 0);
}

tree::TerminalNode* HogQLParser::ColumnExprNullTupleAccessContext::DECIMAL_LITERAL() {
  return getToken(HogQLParser::DECIMAL_LITERAL, 0);
}

HogQLParser::ColumnExprNullTupleAccessContext::ColumnExprNullTupleAccessContext(ColumnExprContext *ctx) { copyFrom(ctx); }


std::any HogQLParser::ColumnExprNullTupleAccessContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
    return parserVisitor->visitColumnExprNullTupleAccess(this);
  else
    return visitor->visitChildren(this);
}
//----------------- ColumnExprPrecedence1Context ------------------------------------------------------------------

std::vector<HogQLParser::ColumnExprContext *> HogQLParser::ColumnExprPrecedence1Context::columnExpr() {
  return getRuleContexts<HogQLParser::ColumnExprContext>();
}

HogQLParser::ColumnExprContext* HogQLParser::ColumnExprPrecedence1Context::columnExpr(size_t i) {
  return getRuleContext<HogQLParser::ColumnExprContext>(i);
}

tree::TerminalNode* HogQLParser::ColumnExprPrecedence1Context::ASTERISK() {
  return getToken(HogQLParser::ASTERISK, 0);
}

tree::TerminalNode* HogQLParser::ColumnExprPrecedence1Context::SLASH() {
  return getToken(HogQLParser::SLASH, 0);
}

tree::TerminalNode* HogQLParser::ColumnExprPrecedence1Context::PERCENT() {
  return getToken(HogQLParser::PERCENT, 0);
}

HogQLParser::ColumnExprPrecedence1Context::ColumnExprPrecedence1Context(ColumnExprContext *ctx) { copyFrom(ctx); }


std::any HogQLParser::ColumnExprPrecedence1Context::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
    return parserVisitor->visitColumnExprPrecedence1(this);
  else
    return visitor->visitChildren(this);
}
//----------------- ColumnExprPrecedence2Context ------------------------------------------------------------------

std::vector<HogQLParser::ColumnExprContext *> HogQLParser::ColumnExprPrecedence2Context::columnExpr() {
  return getRuleContexts<HogQLParser::ColumnExprContext>();
}

HogQLParser::ColumnExprContext* HogQLParser::ColumnExprPrecedence2Context::columnExpr(size_t i) {
  return getRuleContext<HogQLParser::ColumnExprContext>(i);
}

tree::TerminalNode* HogQLParser::ColumnExprPrecedence2Context::PLUS() {
  return getToken(HogQLParser::PLUS, 0);
}

tree::TerminalNode* HogQLParser::ColumnExprPrecedence2Context::DASH() {
  return getToken(HogQLParser::DASH, 0);
}

tree::TerminalNode* HogQLParser::ColumnExprPrecedence2Context::CONCAT() {
  return getToken(HogQLParser::CONCAT, 0);
}

HogQLParser::ColumnExprPrecedence2Context::ColumnExprPrecedence2Context(ColumnExprContext *ctx) { copyFrom(ctx); }


std::any HogQLParser::ColumnExprPrecedence2Context::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
    return parserVisitor->visitColumnExprPrecedence2(this);
  else
    return visitor->visitChildren(this);
}
//----------------- ColumnExprPrecedence3Context ------------------------------------------------------------------

std::vector<HogQLParser::ColumnExprContext *> HogQLParser::ColumnExprPrecedence3Context::columnExpr() {
  return getRuleContexts<HogQLParser::ColumnExprContext>();
}

HogQLParser::ColumnExprContext* HogQLParser::ColumnExprPrecedence3Context::columnExpr(size_t i) {
  return getRuleContext<HogQLParser::ColumnExprContext>(i);
}

tree::TerminalNode* HogQLParser::ColumnExprPrecedence3Context::IN() {
  return getToken(HogQLParser::IN, 0);
}

tree::TerminalNode* HogQLParser::ColumnExprPrecedence3Context::EQ_DOUBLE() {
  return getToken(HogQLParser::EQ_DOUBLE, 0);
}

tree::TerminalNode* HogQLParser::ColumnExprPrecedence3Context::EQ_SINGLE() {
  return getToken(HogQLParser::EQ_SINGLE, 0);
}

tree::TerminalNode* HogQLParser::ColumnExprPrecedence3Context::NOT_EQ() {
  return getToken(HogQLParser::NOT_EQ, 0);
}

tree::TerminalNode* HogQLParser::ColumnExprPrecedence3Context::LT_EQ() {
  return getToken(HogQLParser::LT_EQ, 0);
}

tree::TerminalNode* HogQLParser::ColumnExprPrecedence3Context::LT() {
  return getToken(HogQLParser::LT, 0);
}

tree::TerminalNode* HogQLParser::ColumnExprPrecedence3Context::GT_EQ() {
  return getToken(HogQLParser::GT_EQ, 0);
}

tree::TerminalNode* HogQLParser::ColumnExprPrecedence3Context::GT() {
  return getToken(HogQLParser::GT, 0);
}

tree::TerminalNode* HogQLParser::ColumnExprPrecedence3Context::LIKE() {
  return getToken(HogQLParser::LIKE, 0);
}

tree::TerminalNode* HogQLParser::ColumnExprPrecedence3Context::ILIKE() {
  return getToken(HogQLParser::ILIKE, 0);
}

tree::TerminalNode* HogQLParser::ColumnExprPrecedence3Context::REGEX_SINGLE() {
  return getToken(HogQLParser::REGEX_SINGLE, 0);
}

tree::TerminalNode* HogQLParser::ColumnExprPrecedence3Context::REGEX_DOUBLE() {
  return getToken(HogQLParser::REGEX_DOUBLE, 0);
}

tree::TerminalNode* HogQLParser::ColumnExprPrecedence3Context::NOT_REGEX() {
  return getToken(HogQLParser::NOT_REGEX, 0);
}

tree::TerminalNode* HogQLParser::ColumnExprPrecedence3Context::IREGEX_SINGLE() {
  return getToken(HogQLParser::IREGEX_SINGLE, 0);
}

tree::TerminalNode* HogQLParser::ColumnExprPrecedence3Context::IREGEX_DOUBLE() {
  return getToken(HogQLParser::IREGEX_DOUBLE, 0);
}

tree::TerminalNode* HogQLParser::ColumnExprPrecedence3Context::NOT_IREGEX() {
  return getToken(HogQLParser::NOT_IREGEX, 0);
}

tree::TerminalNode* HogQLParser::ColumnExprPrecedence3Context::COHORT() {
  return getToken(HogQLParser::COHORT, 0);
}

tree::TerminalNode* HogQLParser::ColumnExprPrecedence3Context::NOT() {
  return getToken(HogQLParser::NOT, 0);
}

HogQLParser::ColumnExprPrecedence3Context::ColumnExprPrecedence3Context(ColumnExprContext *ctx) { copyFrom(ctx); }


std::any HogQLParser::ColumnExprPrecedence3Context::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
    return parserVisitor->visitColumnExprPrecedence3(this);
  else
    return visitor->visitChildren(this);
}
//----------------- ColumnExprIntervalContext ------------------------------------------------------------------

tree::TerminalNode* HogQLParser::ColumnExprIntervalContext::INTERVAL() {
  return getToken(HogQLParser::INTERVAL, 0);
}

HogQLParser::ColumnExprContext* HogQLParser::ColumnExprIntervalContext::columnExpr() {
  return getRuleContext<HogQLParser::ColumnExprContext>(0);
}

HogQLParser::IntervalContext* HogQLParser::ColumnExprIntervalContext::interval() {
  return getRuleContext<HogQLParser::IntervalContext>(0);
}

HogQLParser::ColumnExprIntervalContext::ColumnExprIntervalContext(ColumnExprContext *ctx) { copyFrom(ctx); }


std::any HogQLParser::ColumnExprIntervalContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
    return parserVisitor->visitColumnExprInterval(this);
  else
    return visitor->visitChildren(this);
}
//----------------- ColumnExprCallSelectContext ------------------------------------------------------------------

HogQLParser::ColumnExprContext* HogQLParser::ColumnExprCallSelectContext::columnExpr() {
  return getRuleContext<HogQLParser::ColumnExprContext>(0);
}

tree::TerminalNode* HogQLParser::ColumnExprCallSelectContext::LPAREN() {
  return getToken(HogQLParser::LPAREN, 0);
}

HogQLParser::SelectSetStmtContext* HogQLParser::ColumnExprCallSelectContext::selectSetStmt() {
  return getRuleContext<HogQLParser::SelectSetStmtContext>(0);
}

tree::TerminalNode* HogQLParser::ColumnExprCallSelectContext::RPAREN() {
  return getToken(HogQLParser::RPAREN, 0);
}

HogQLParser::ColumnExprCallSelectContext::ColumnExprCallSelectContext(ColumnExprContext *ctx) { copyFrom(ctx); }


std::any HogQLParser::ColumnExprCallSelectContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
    return parserVisitor->visitColumnExprCallSelect(this);
  else
    return visitor->visitChildren(this);
}
//----------------- ColumnExprIsNullContext ------------------------------------------------------------------

HogQLParser::ColumnExprContext* HogQLParser::ColumnExprIsNullContext::columnExpr() {
  return getRuleContext<HogQLParser::ColumnExprContext>(0);
}

tree::TerminalNode* HogQLParser::ColumnExprIsNullContext::IS() {
  return getToken(HogQLParser::IS, 0);
}

tree::TerminalNode* HogQLParser::ColumnExprIsNullContext::NULL_SQL() {
  return getToken(HogQLParser::NULL_SQL, 0);
}

tree::TerminalNode* HogQLParser::ColumnExprIsNullContext::NOT() {
  return getToken(HogQLParser::NOT, 0);
}

HogQLParser::ColumnExprIsNullContext::ColumnExprIsNullContext(ColumnExprContext *ctx) { copyFrom(ctx); }


std::any HogQLParser::ColumnExprIsNullContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
    return parserVisitor->visitColumnExprIsNull(this);
  else
    return visitor->visitChildren(this);
}
//----------------- ColumnExprWinFunctionTargetContext ------------------------------------------------------------------

std::vector<HogQLParser::IdentifierContext *> HogQLParser::ColumnExprWinFunctionTargetContext::identifier() {
  return getRuleContexts<HogQLParser::IdentifierContext>();
}

HogQLParser::IdentifierContext* HogQLParser::ColumnExprWinFunctionTargetContext::identifier(size_t i) {
  return getRuleContext<HogQLParser::IdentifierContext>(i);
}

tree::TerminalNode* HogQLParser::ColumnExprWinFunctionTargetContext::OVER() {
  return getToken(HogQLParser::OVER, 0);
}

std::vector<tree::TerminalNode *> HogQLParser::ColumnExprWinFunctionTargetContext::LPAREN() {
  return getTokens(HogQLParser::LPAREN);
}

tree::TerminalNode* HogQLParser::ColumnExprWinFunctionTargetContext::LPAREN(size_t i) {
  return getToken(HogQLParser::LPAREN, i);
}

std::vector<tree::TerminalNode *> HogQLParser::ColumnExprWinFunctionTargetContext::RPAREN() {
  return getTokens(HogQLParser::RPAREN);
}

tree::TerminalNode* HogQLParser::ColumnExprWinFunctionTargetContext::RPAREN(size_t i) {
  return getToken(HogQLParser::RPAREN, i);
}

std::vector<HogQLParser::ColumnExprListContext *> HogQLParser::ColumnExprWinFunctionTargetContext::columnExprList() {
  return getRuleContexts<HogQLParser::ColumnExprListContext>();
}

HogQLParser::ColumnExprListContext* HogQLParser::ColumnExprWinFunctionTargetContext::columnExprList(size_t i) {
  return getRuleContext<HogQLParser::ColumnExprListContext>(i);
}

tree::TerminalNode* HogQLParser::ColumnExprWinFunctionTargetContext::DISTINCT() {
  return getToken(HogQLParser::DISTINCT, 0);
}

HogQLParser::ColumnExprWinFunctionTargetContext::ColumnExprWinFunctionTargetContext(ColumnExprContext *ctx) { copyFrom(ctx); }


std::any HogQLParser::ColumnExprWinFunctionTargetContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
    return parserVisitor->visitColumnExprWinFunctionTarget(this);
  else
    return visitor->visitChildren(this);
}
//----------------- ColumnExprNullPropertyAccessContext ------------------------------------------------------------------

HogQLParser::ColumnExprContext* HogQLParser::ColumnExprNullPropertyAccessContext::columnExpr() {
  return getRuleContext<HogQLParser::ColumnExprContext>(0);
}

tree::TerminalNode* HogQLParser::ColumnExprNullPropertyAccessContext::NULL_PROPERTY() {
  return getToken(HogQLParser::NULL_PROPERTY, 0);
}

HogQLParser::IdentifierContext* HogQLParser::ColumnExprNullPropertyAccessContext::identifier() {
  return getRuleContext<HogQLParser::IdentifierContext>(0);
}

HogQLParser::ColumnExprNullPropertyAccessContext::ColumnExprNullPropertyAccessContext(ColumnExprContext *ctx) { copyFrom(ctx); }


std::any HogQLParser::ColumnExprNullPropertyAccessContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
    return parserVisitor->visitColumnExprNullPropertyAccess(this);
  else
    return visitor->visitChildren(this);
}
//----------------- ColumnExprIntervalStringContext ------------------------------------------------------------------

tree::TerminalNode* HogQLParser::ColumnExprIntervalStringContext::INTERVAL() {
  return getToken(HogQLParser::INTERVAL, 0);
}

tree::TerminalNode* HogQLParser::ColumnExprIntervalStringContext::STRING_LITERAL() {
  return getToken(HogQLParser::STRING_LITERAL, 0);
}

HogQLParser::ColumnExprIntervalStringContext::ColumnExprIntervalStringContext(ColumnExprContext *ctx) { copyFrom(ctx); }


std::any HogQLParser::ColumnExprIntervalStringContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
    return parserVisitor->visitColumnExprIntervalString(this);
  else
    return visitor->visitChildren(this);
}
//----------------- ColumnExprTrimContext ------------------------------------------------------------------

tree::TerminalNode* HogQLParser::ColumnExprTrimContext::TRIM() {
  return getToken(HogQLParser::TRIM, 0);
}

tree::TerminalNode* HogQLParser::ColumnExprTrimContext::LPAREN() {
  return getToken(HogQLParser::LPAREN, 0);
}

HogQLParser::StringContext* HogQLParser::ColumnExprTrimContext::string() {
  return getRuleContext<HogQLParser::StringContext>(0);
}

tree::TerminalNode* HogQLParser::ColumnExprTrimContext::FROM() {
  return getToken(HogQLParser::FROM, 0);
}

HogQLParser::ColumnExprContext* HogQLParser::ColumnExprTrimContext::columnExpr() {
  return getRuleContext<HogQLParser::ColumnExprContext>(0);
}

tree::TerminalNode* HogQLParser::ColumnExprTrimContext::RPAREN() {
  return getToken(HogQLParser::RPAREN, 0);
}

tree::TerminalNode* HogQLParser::ColumnExprTrimContext::BOTH() {
  return getToken(HogQLParser::BOTH, 0);
}

tree::TerminalNode* HogQLParser::ColumnExprTrimContext::LEADING() {
  return getToken(HogQLParser::LEADING, 0);
}

tree::TerminalNode* HogQLParser::ColumnExprTrimContext::TRAILING() {
  return getToken(HogQLParser::TRAILING, 0);
}

HogQLParser::ColumnExprTrimContext::ColumnExprTrimContext(ColumnExprContext *ctx) { copyFrom(ctx); }


std::any HogQLParser::ColumnExprTrimContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
    return parserVisitor->visitColumnExprTrim(this);
  else
    return visitor->visitChildren(this);
}
//----------------- ColumnExprTagElementContext ------------------------------------------------------------------

HogQLParser::HogqlxTagElementContext* HogQLParser::ColumnExprTagElementContext::hogqlxTagElement() {
  return getRuleContext<HogQLParser::HogqlxTagElementContext>(0);
}

HogQLParser::ColumnExprTagElementContext::ColumnExprTagElementContext(ColumnExprContext *ctx) { copyFrom(ctx); }


std::any HogQLParser::ColumnExprTagElementContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
    return parserVisitor->visitColumnExprTagElement(this);
  else
    return visitor->visitChildren(this);
}
//----------------- ColumnExprTemplateStringContext ------------------------------------------------------------------

HogQLParser::TemplateStringContext* HogQLParser::ColumnExprTemplateStringContext::templateString() {
  return getRuleContext<HogQLParser::TemplateStringContext>(0);
}

HogQLParser::ColumnExprTemplateStringContext::ColumnExprTemplateStringContext(ColumnExprContext *ctx) { copyFrom(ctx); }


std::any HogQLParser::ColumnExprTemplateStringContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
    return parserVisitor->visitColumnExprTemplateString(this);
  else
    return visitor->visitChildren(this);
}
//----------------- ColumnExprTupleContext ------------------------------------------------------------------

tree::TerminalNode* HogQLParser::ColumnExprTupleContext::LPAREN() {
  return getToken(HogQLParser::LPAREN, 0);
}

HogQLParser::ColumnExprListContext* HogQLParser::ColumnExprTupleContext::columnExprList() {
  return getRuleContext<HogQLParser::ColumnExprListContext>(0);
}

tree::TerminalNode* HogQLParser::ColumnExprTupleContext::RPAREN() {
  return getToken(HogQLParser::RPAREN, 0);
}

HogQLParser::ColumnExprTupleContext::ColumnExprTupleContext(ColumnExprContext *ctx) { copyFrom(ctx); }


std::any HogQLParser::ColumnExprTupleContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
    return parserVisitor->visitColumnExprTuple(this);
  else
    return visitor->visitChildren(this);
}
//----------------- ColumnExprCallContext ------------------------------------------------------------------

HogQLParser::ColumnExprContext* HogQLParser::ColumnExprCallContext::columnExpr() {
  return getRuleContext<HogQLParser::ColumnExprContext>(0);
}

tree::TerminalNode* HogQLParser::ColumnExprCallContext::LPAREN() {
  return getToken(HogQLParser::LPAREN, 0);
}

tree::TerminalNode* HogQLParser::ColumnExprCallContext::RPAREN() {
  return getToken(HogQLParser::RPAREN, 0);
}

HogQLParser::ColumnExprListContext* HogQLParser::ColumnExprCallContext::columnExprList() {
  return getRuleContext<HogQLParser::ColumnExprListContext>(0);
}

HogQLParser::ColumnExprCallContext::ColumnExprCallContext(ColumnExprContext *ctx) { copyFrom(ctx); }


std::any HogQLParser::ColumnExprCallContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
    return parserVisitor->visitColumnExprCall(this);
  else
    return visitor->visitChildren(this);
}
//----------------- ColumnExprArrayAccessContext ------------------------------------------------------------------

std::vector<HogQLParser::ColumnExprContext *> HogQLParser::ColumnExprArrayAccessContext::columnExpr() {
  return getRuleContexts<HogQLParser::ColumnExprContext>();
}

HogQLParser::ColumnExprContext* HogQLParser::ColumnExprArrayAccessContext::columnExpr(size_t i) {
  return getRuleContext<HogQLParser::ColumnExprContext>(i);
}

tree::TerminalNode* HogQLParser::ColumnExprArrayAccessContext::LBRACKET() {
  return getToken(HogQLParser::LBRACKET, 0);
}

tree::TerminalNode* HogQLParser::ColumnExprArrayAccessContext::RBRACKET() {
  return getToken(HogQLParser::RBRACKET, 0);
}

HogQLParser::ColumnExprArrayAccessContext::ColumnExprArrayAccessContext(ColumnExprContext *ctx) { copyFrom(ctx); }


std::any HogQLParser::ColumnExprArrayAccessContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
    return parserVisitor->visitColumnExprArrayAccess(this);
  else
    return visitor->visitChildren(this);
}
//----------------- ColumnExprBetweenContext ------------------------------------------------------------------

std::vector<HogQLParser::ColumnExprContext *> HogQLParser::ColumnExprBetweenContext::columnExpr() {
  return getRuleContexts<HogQLParser::ColumnExprContext>();
}

HogQLParser::ColumnExprContext* HogQLParser::ColumnExprBetweenContext::columnExpr(size_t i) {
  return getRuleContext<HogQLParser::ColumnExprContext>(i);
}

tree::TerminalNode* HogQLParser::ColumnExprBetweenContext::BETWEEN() {
  return getToken(HogQLParser::BETWEEN, 0);
}

tree::TerminalNode* HogQLParser::ColumnExprBetweenContext::AND() {
  return getToken(HogQLParser::AND, 0);
}

tree::TerminalNode* HogQLParser::ColumnExprBetweenContext::NOT() {
  return getToken(HogQLParser::NOT, 0);
}

HogQLParser::ColumnExprBetweenContext::ColumnExprBetweenContext(ColumnExprContext *ctx) { copyFrom(ctx); }


std::any HogQLParser::ColumnExprBetweenContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
    return parserVisitor->visitColumnExprBetween(this);
  else
    return visitor->visitChildren(this);
}
//----------------- ColumnExprPropertyAccessContext ------------------------------------------------------------------

HogQLParser::ColumnExprContext* HogQLParser::ColumnExprPropertyAccessContext::columnExpr() {
  return getRuleContext<HogQLParser::ColumnExprContext>(0);
}

tree::TerminalNode* HogQLParser::ColumnExprPropertyAccessContext::DOT() {
  return getToken(HogQLParser::DOT, 0);
}

HogQLParser::IdentifierContext* HogQLParser::ColumnExprPropertyAccessContext::identifier() {
  return getRuleContext<HogQLParser::IdentifierContext>(0);
}

HogQLParser::ColumnExprPropertyAccessContext::ColumnExprPropertyAccessContext(ColumnExprContext *ctx) { copyFrom(ctx); }


std::any HogQLParser::ColumnExprPropertyAccessContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
    return parserVisitor->visitColumnExprPropertyAccess(this);
  else
    return visitor->visitChildren(this);
}
//----------------- ColumnExprParensContext ------------------------------------------------------------------

tree::TerminalNode* HogQLParser::ColumnExprParensContext::LPAREN() {
  return getToken(HogQLParser::LPAREN, 0);
}

HogQLParser::ColumnExprContext* HogQLParser::ColumnExprParensContext::columnExpr() {
  return getRuleContext<HogQLParser::ColumnExprContext>(0);
}

tree::TerminalNode* HogQLParser::ColumnExprParensContext::RPAREN() {
  return getToken(HogQLParser::RPAREN, 0);
}

HogQLParser::ColumnExprParensContext::ColumnExprParensContext(ColumnExprContext *ctx) { copyFrom(ctx); }


std::any HogQLParser::ColumnExprParensContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
    return parserVisitor->visitColumnExprParens(this);
  else
    return visitor->visitChildren(this);
}
//----------------- ColumnExprNullArrayAccessContext ------------------------------------------------------------------

std::vector<HogQLParser::ColumnExprContext *> HogQLParser::ColumnExprNullArrayAccessContext::columnExpr() {
  return getRuleContexts<HogQLParser::ColumnExprContext>();
}

HogQLParser::ColumnExprContext* HogQLParser::ColumnExprNullArrayAccessContext::columnExpr(size_t i) {
  return getRuleContext<HogQLParser::ColumnExprContext>(i);
}

tree::TerminalNode* HogQLParser::ColumnExprNullArrayAccessContext::NULL_PROPERTY() {
  return getToken(HogQLParser::NULL_PROPERTY, 0);
}

tree::TerminalNode* HogQLParser::ColumnExprNullArrayAccessContext::LBRACKET() {
  return getToken(HogQLParser::LBRACKET, 0);
}

tree::TerminalNode* HogQLParser::ColumnExprNullArrayAccessContext::RBRACKET() {
  return getToken(HogQLParser::RBRACKET, 0);
}

HogQLParser::ColumnExprNullArrayAccessContext::ColumnExprNullArrayAccessContext(ColumnExprContext *ctx) { copyFrom(ctx); }


std::any HogQLParser::ColumnExprNullArrayAccessContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
    return parserVisitor->visitColumnExprNullArrayAccess(this);
  else
    return visitor->visitChildren(this);
}
//----------------- ColumnExprTimestampContext ------------------------------------------------------------------

tree::TerminalNode* HogQLParser::ColumnExprTimestampContext::TIMESTAMP() {
  return getToken(HogQLParser::TIMESTAMP, 0);
}

tree::TerminalNode* HogQLParser::ColumnExprTimestampContext::STRING_LITERAL() {
  return getToken(HogQLParser::STRING_LITERAL, 0);
}

HogQLParser::ColumnExprTimestampContext::ColumnExprTimestampContext(ColumnExprContext *ctx) { copyFrom(ctx); }


std::any HogQLParser::ColumnExprTimestampContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
    return parserVisitor->visitColumnExprTimestamp(this);
  else
    return visitor->visitChildren(this);
}
//----------------- ColumnExprNullishContext ------------------------------------------------------------------

std::vector<HogQLParser::ColumnExprContext *> HogQLParser::ColumnExprNullishContext::columnExpr() {
  return getRuleContexts<HogQLParser::ColumnExprContext>();
}

HogQLParser::ColumnExprContext* HogQLParser::ColumnExprNullishContext::columnExpr(size_t i) {
  return getRuleContext<HogQLParser::ColumnExprContext>(i);
}

tree::TerminalNode* HogQLParser::ColumnExprNullishContext::NULLISH() {
  return getToken(HogQLParser::NULLISH, 0);
}

HogQLParser::ColumnExprNullishContext::ColumnExprNullishContext(ColumnExprContext *ctx) { copyFrom(ctx); }


std::any HogQLParser::ColumnExprNullishContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
    return parserVisitor->visitColumnExprNullish(this);
  else
    return visitor->visitChildren(this);
}
//----------------- ColumnExprAndContext ------------------------------------------------------------------

std::vector<HogQLParser::ColumnExprContext *> HogQLParser::ColumnExprAndContext::columnExpr() {
  return getRuleContexts<HogQLParser::ColumnExprContext>();
}

HogQLParser::ColumnExprContext* HogQLParser::ColumnExprAndContext::columnExpr(size_t i) {
  return getRuleContext<HogQLParser::ColumnExprContext>(i);
}

tree::TerminalNode* HogQLParser::ColumnExprAndContext::AND() {
  return getToken(HogQLParser::AND, 0);
}

HogQLParser::ColumnExprAndContext::ColumnExprAndContext(ColumnExprContext *ctx) { copyFrom(ctx); }


std::any HogQLParser::ColumnExprAndContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
    return parserVisitor->visitColumnExprAnd(this);
  else
    return visitor->visitChildren(this);
}
//----------------- ColumnExprTupleAccessContext ------------------------------------------------------------------

HogQLParser::ColumnExprContext* HogQLParser::ColumnExprTupleAccessContext::columnExpr() {
  return getRuleContext<HogQLParser::ColumnExprContext>(0);
}

tree::TerminalNode* HogQLParser::ColumnExprTupleAccessContext::DOT() {
  return getToken(HogQLParser::DOT, 0);
}

tree::TerminalNode* HogQLParser::ColumnExprTupleAccessContext::DECIMAL_LITERAL() {
  return getToken(HogQLParser::DECIMAL_LITERAL, 0);
}

HogQLParser::ColumnExprTupleAccessContext::ColumnExprTupleAccessContext(ColumnExprContext *ctx) { copyFrom(ctx); }


std::any HogQLParser::ColumnExprTupleAccessContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
    return parserVisitor->visitColumnExprTupleAccess(this);
  else
    return visitor->visitChildren(this);
}
//----------------- ColumnExprCaseContext ------------------------------------------------------------------

tree::TerminalNode* HogQLParser::ColumnExprCaseContext::CASE() {
  return getToken(HogQLParser::CASE, 0);
}

tree::TerminalNode* HogQLParser::ColumnExprCaseContext::END() {
  return getToken(HogQLParser::END, 0);
}

std::vector<tree::TerminalNode *> HogQLParser::ColumnExprCaseContext::WHEN() {
  return getTokens(HogQLParser::WHEN);
}

tree::TerminalNode* HogQLParser::ColumnExprCaseContext::WHEN(size_t i) {
  return getToken(HogQLParser::WHEN, i);
}

std::vector<tree::TerminalNode *> HogQLParser::ColumnExprCaseContext::THEN() {
  return getTokens(HogQLParser::THEN);
}

tree::TerminalNode* HogQLParser::ColumnExprCaseContext::THEN(size_t i) {
  return getToken(HogQLParser::THEN, i);
}

tree::TerminalNode* HogQLParser::ColumnExprCaseContext::ELSE() {
  return getToken(HogQLParser::ELSE, 0);
}

std::vector<HogQLParser::ColumnExprContext *> HogQLParser::ColumnExprCaseContext::columnExpr() {
  return getRuleContexts<HogQLParser::ColumnExprContext>();
}

HogQLParser::ColumnExprContext* HogQLParser::ColumnExprCaseContext::columnExpr(size_t i) {
  return getRuleContext<HogQLParser::ColumnExprContext>(i);
}

HogQLParser::ColumnExprCaseContext::ColumnExprCaseContext(ColumnExprContext *ctx) { copyFrom(ctx); }


std::any HogQLParser::ColumnExprCaseContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
    return parserVisitor->visitColumnExprCase(this);
  else
    return visitor->visitChildren(this);
}
//----------------- ColumnExprDateContext ------------------------------------------------------------------

tree::TerminalNode* HogQLParser::ColumnExprDateContext::DATE() {
  return getToken(HogQLParser::DATE, 0);
}

tree::TerminalNode* HogQLParser::ColumnExprDateContext::STRING_LITERAL() {
  return getToken(HogQLParser::STRING_LITERAL, 0);
}

HogQLParser::ColumnExprDateContext::ColumnExprDateContext(ColumnExprContext *ctx) { copyFrom(ctx); }


std::any HogQLParser::ColumnExprDateContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
    return parserVisitor->visitColumnExprDate(this);
  else
    return visitor->visitChildren(this);
}
//----------------- ColumnExprNotContext ------------------------------------------------------------------

tree::TerminalNode* HogQLParser::ColumnExprNotContext::NOT() {
  return getToken(HogQLParser::NOT, 0);
}

HogQLParser::ColumnExprContext* HogQLParser::ColumnExprNotContext::columnExpr() {
  return getRuleContext<HogQLParser::ColumnExprContext>(0);
}

HogQLParser::ColumnExprNotContext::ColumnExprNotContext(ColumnExprContext *ctx) { copyFrom(ctx); }


std::any HogQLParser::ColumnExprNotContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
    return parserVisitor->visitColumnExprNot(this);
  else
    return visitor->visitChildren(this);
}
//----------------- ColumnExprWinFunctionContext ------------------------------------------------------------------

HogQLParser::IdentifierContext* HogQLParser::ColumnExprWinFunctionContext::identifier() {
  return getRuleContext<HogQLParser::IdentifierContext>(0);
}

tree::TerminalNode* HogQLParser::ColumnExprWinFunctionContext::OVER() {
  return getToken(HogQLParser::OVER, 0);
}

std::vector<tree::TerminalNode *> HogQLParser::ColumnExprWinFunctionContext::LPAREN() {
  return getTokens(HogQLParser::LPAREN);
}

tree::TerminalNode* HogQLParser::ColumnExprWinFunctionContext::LPAREN(size_t i) {
  return getToken(HogQLParser::LPAREN, i);
}

HogQLParser::WindowExprContext* HogQLParser::ColumnExprWinFunctionContext::windowExpr() {
  return getRuleContext<HogQLParser::WindowExprContext>(0);
}

std::vector<tree::TerminalNode *> HogQLParser::ColumnExprWinFunctionContext::RPAREN() {
  return getTokens(HogQLParser::RPAREN);
}

tree::TerminalNode* HogQLParser::ColumnExprWinFunctionContext::RPAREN(size_t i) {
  return getToken(HogQLParser::RPAREN, i);
}

std::vector<HogQLParser::ColumnExprListContext *> HogQLParser::ColumnExprWinFunctionContext::columnExprList() {
  return getRuleContexts<HogQLParser::ColumnExprListContext>();
}

HogQLParser::ColumnExprListContext* HogQLParser::ColumnExprWinFunctionContext::columnExprList(size_t i) {
  return getRuleContext<HogQLParser::ColumnExprListContext>(i);
}

tree::TerminalNode* HogQLParser::ColumnExprWinFunctionContext::DISTINCT() {
  return getToken(HogQLParser::DISTINCT, 0);
}

HogQLParser::ColumnExprWinFunctionContext::ColumnExprWinFunctionContext(ColumnExprContext *ctx) { copyFrom(ctx); }


std::any HogQLParser::ColumnExprWinFunctionContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
    return parserVisitor->visitColumnExprWinFunction(this);
  else
    return visitor->visitChildren(this);
}
//----------------- ColumnExprLambdaContext ------------------------------------------------------------------

HogQLParser::ColumnLambdaExprContext* HogQLParser::ColumnExprLambdaContext::columnLambdaExpr() {
  return getRuleContext<HogQLParser::ColumnLambdaExprContext>(0);
}

HogQLParser::ColumnExprLambdaContext::ColumnExprLambdaContext(ColumnExprContext *ctx) { copyFrom(ctx); }


std::any HogQLParser::ColumnExprLambdaContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
    return parserVisitor->visitColumnExprLambda(this);
  else
    return visitor->visitChildren(this);
}
//----------------- ColumnExprIdentifierContext ------------------------------------------------------------------

HogQLParser::ColumnIdentifierContext* HogQLParser::ColumnExprIdentifierContext::columnIdentifier() {
  return getRuleContext<HogQLParser::ColumnIdentifierContext>(0);
}

HogQLParser::ColumnExprIdentifierContext::ColumnExprIdentifierContext(ColumnExprContext *ctx) { copyFrom(ctx); }


std::any HogQLParser::ColumnExprIdentifierContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
    return parserVisitor->visitColumnExprIdentifier(this);
  else
    return visitor->visitChildren(this);
}
//----------------- ColumnExprFunctionContext ------------------------------------------------------------------

HogQLParser::IdentifierContext* HogQLParser::ColumnExprFunctionContext::identifier() {
  return getRuleContext<HogQLParser::IdentifierContext>(0);
}

std::vector<tree::TerminalNode *> HogQLParser::ColumnExprFunctionContext::LPAREN() {
  return getTokens(HogQLParser::LPAREN);
}

tree::TerminalNode* HogQLParser::ColumnExprFunctionContext::LPAREN(size_t i) {
  return getToken(HogQLParser::LPAREN, i);
}

std::vector<tree::TerminalNode *> HogQLParser::ColumnExprFunctionContext::RPAREN() {
  return getTokens(HogQLParser::RPAREN);
}

tree::TerminalNode* HogQLParser::ColumnExprFunctionContext::RPAREN(size_t i) {
  return getToken(HogQLParser::RPAREN, i);
}

tree::TerminalNode* HogQLParser::ColumnExprFunctionContext::DISTINCT() {
  return getToken(HogQLParser::DISTINCT, 0);
}

std::vector<HogQLParser::ColumnExprListContext *> HogQLParser::ColumnExprFunctionContext::columnExprList() {
  return getRuleContexts<HogQLParser::ColumnExprListContext>();
}

HogQLParser::ColumnExprListContext* HogQLParser::ColumnExprFunctionContext::columnExprList(size_t i) {
  return getRuleContext<HogQLParser::ColumnExprListContext>(i);
}

HogQLParser::ColumnExprFunctionContext::ColumnExprFunctionContext(ColumnExprContext *ctx) { copyFrom(ctx); }


std::any HogQLParser::ColumnExprFunctionContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
    return parserVisitor->visitColumnExprFunction(this);
  else
    return visitor->visitChildren(this);
}
//----------------- ColumnExprAsteriskContext ------------------------------------------------------------------

tree::TerminalNode* HogQLParser::ColumnExprAsteriskContext::ASTERISK() {
  return getToken(HogQLParser::ASTERISK, 0);
}

HogQLParser::TableIdentifierContext* HogQLParser::ColumnExprAsteriskContext::tableIdentifier() {
  return getRuleContext<HogQLParser::TableIdentifierContext>(0);
}

tree::TerminalNode* HogQLParser::ColumnExprAsteriskContext::DOT() {
  return getToken(HogQLParser::DOT, 0);
}

HogQLParser::ColumnExprAsteriskContext::ColumnExprAsteriskContext(ColumnExprContext *ctx) { copyFrom(ctx); }


std::any HogQLParser::ColumnExprAsteriskContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
    return parserVisitor->visitColumnExprAsterisk(this);
  else
    return visitor->visitChildren(this);
}

HogQLParser::ColumnExprContext* HogQLParser::columnExpr() {
   return columnExpr(0);
}

HogQLParser::ColumnExprContext* HogQLParser::columnExpr(int precedence) {
  ParserRuleContext *parentContext = _ctx;
  size_t parentState = getState();
  HogQLParser::ColumnExprContext *_localctx = _tracker.createInstance<ColumnExprContext>(_ctx, parentState);
  HogQLParser::ColumnExprContext *previousContext = _localctx;
  (void)previousContext; // Silence compiler, in case the context is not used by generated code.
  size_t startState = 122;
  enterRecursionRule(_localctx, 122, HogQLParser::RuleColumnExpr, precedence);

    size_t _la = 0;

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    unrollRecursionContexts(parentContext);
  });
  try {
    size_t alt;
    enterOuterAlt(_localctx, 1);
    setState(960);
    _errHandler->sync(this);
    switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 121, _ctx)) {
    case 1: {
      _localctx = _tracker.createInstance<ColumnExprCaseContext>(_localctx);
      _ctx = _localctx;
      previousContext = _localctx;

      setState(809);
      match(HogQLParser::CASE);
      setState(811);
      _errHandler->sync(this);

      switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 102, _ctx)) {
      case 1: {
        setState(810);
        antlrcpp::downCast<ColumnExprCaseContext *>(_localctx)->caseExpr = columnExpr(0);
        break;
      }

      default:
        break;
      }
      setState(818); 
      _errHandler->sync(this);
      _la = _input->LA(1);
      do {
        setState(813);
        match(HogQLParser::WHEN);
        setState(814);
        antlrcpp::downCast<ColumnExprCaseContext *>(_localctx)->whenExpr = columnExpr(0);
        setState(815);
        match(HogQLParser::THEN);
        setState(816);
        antlrcpp::downCast<ColumnExprCaseContext *>(_localctx)->thenExpr = columnExpr(0);
        setState(820); 
        _errHandler->sync(this);
        _la = _input->LA(1);
      } while (_la == HogQLParser::WHEN);
      setState(824);
      _errHandler->sync(this);

      _la = _input->LA(1);
      if (_la == HogQLParser::ELSE) {
        setState(822);
        match(HogQLParser::ELSE);
        setState(823);
        antlrcpp::downCast<ColumnExprCaseContext *>(_localctx)->elseExpr = columnExpr(0);
      }
      setState(826);
      match(HogQLParser::END);
      break;
    }

    case 2: {
      _localctx = _tracker.createInstance<ColumnExprCastContext>(_localctx);
      _ctx = _localctx;
      previousContext = _localctx;
      setState(828);
      match(HogQLParser::CAST);
      setState(829);
      match(HogQLParser::LPAREN);
      setState(830);
      columnExpr(0);
      setState(831);
      match(HogQLParser::AS);
      setState(832);
      columnTypeExpr();
      setState(833);
      match(HogQLParser::RPAREN);
      break;
    }

    case 3: {
      _localctx = _tracker.createInstance<ColumnExprDateContext>(_localctx);
      _ctx = _localctx;
      previousContext = _localctx;
      setState(835);
      match(HogQLParser::DATE);
      setState(836);
      match(HogQLParser::STRING_LITERAL);
      break;
    }

    case 4: {
      _localctx = _tracker.createInstance<ColumnExprIntervalStringContext>(_localctx);
      _ctx = _localctx;
      previousContext = _localctx;
      setState(837);
      match(HogQLParser::INTERVAL);
      setState(838);
      match(HogQLParser::STRING_LITERAL);
      break;
    }

    case 5: {
      _localctx = _tracker.createInstance<ColumnExprIntervalContext>(_localctx);
      _ctx = _localctx;
      previousContext = _localctx;
      setState(839);
      match(HogQLParser::INTERVAL);
      setState(840);
      columnExpr(0);
      setState(841);
      interval();
      break;
    }

    case 6: {
      _localctx = _tracker.createInstance<ColumnExprSubstringContext>(_localctx);
      _ctx = _localctx;
      previousContext = _localctx;
      setState(843);
      match(HogQLParser::SUBSTRING);
      setState(844);
      match(HogQLParser::LPAREN);
      setState(845);
      columnExpr(0);
      setState(846);
      match(HogQLParser::FROM);
      setState(847);
      columnExpr(0);
      setState(850);
      _errHandler->sync(this);

      _la = _input->LA(1);
      if (_la == HogQLParser::FOR) {
        setState(848);
        match(HogQLParser::FOR);
        setState(849);
        columnExpr(0);
      }
      setState(852);
      match(HogQLParser::RPAREN);
      break;
    }

    case 7: {
      _localctx = _tracker.createInstance<ColumnExprTimestampContext>(_localctx);
      _ctx = _localctx;
      previousContext = _localctx;
      setState(854);
      match(HogQLParser::TIMESTAMP);
      setState(855);
      match(HogQLParser::STRING_LITERAL);
      break;
    }

    case 8: {
      _localctx = _tracker.createInstance<ColumnExprTrimContext>(_localctx);
      _ctx = _localctx;
      previousContext = _localctx;
      setState(856);
      match(HogQLParser::TRIM);
      setState(857);
      match(HogQLParser::LPAREN);
      setState(858);
      _la = _input->LA(1);
      if (!(_la == HogQLParser::BOTH

      || _la == HogQLParser::LEADING || _la == HogQLParser::TRAILING)) {
      _errHandler->recoverInline(this);
      }
      else {
        _errHandler->reportMatch(this);
        consume();
      }
      setState(859);
      string();
      setState(860);
      match(HogQLParser::FROM);
      setState(861);
      columnExpr(0);
      setState(862);
      match(HogQLParser::RPAREN);
      break;
    }

    case 9: {
      _localctx = _tracker.createInstance<ColumnExprWinFunctionContext>(_localctx);
      _ctx = _localctx;
      previousContext = _localctx;
      setState(864);
      identifier();

      setState(865);
      match(HogQLParser::LPAREN);
      setState(867);
      _errHandler->sync(this);

      _la = _input->LA(1);
      if ((((_la & ~ 0x3fULL) == 0) &&
        ((1ULL << _la) & -36169677449216002) != 0) || ((((_la - 64) & ~ 0x3fULL) == 0) &&
        ((1ULL << (_la - 64)) & 723944289947615231) != 0) || ((((_la - 131) & ~ 0x3fULL) == 0) &&
        ((1ULL << (_la - 131)) & 36887) != 0)) {
        setState(866);
        antlrcpp::downCast<ColumnExprWinFunctionContext *>(_localctx)->columnExprs = columnExprList();
      }
      setState(869);
      match(HogQLParser::RPAREN);
      setState(879);
      _errHandler->sync(this);

      _la = _input->LA(1);
      if (_la == HogQLParser::LPAREN) {
        setState(871);
        match(HogQLParser::LPAREN);
        setState(873);
        _errHandler->sync(this);

        switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 107, _ctx)) {
        case 1: {
          setState(872);
          match(HogQLParser::DISTINCT);
          break;
        }

        default:
          break;
        }
        setState(876);
        _errHandler->sync(this);

        _la = _input->LA(1);
        if ((((_la & ~ 0x3fULL) == 0) &&
          ((1ULL << _la) & -36169677449216002) != 0) || ((((_la - 64) & ~ 0x3fULL) == 0) &&
          ((1ULL << (_la - 64)) & 723944289947615231) != 0) || ((((_la - 131) & ~ 0x3fULL) == 0) &&
          ((1ULL << (_la - 131)) & 36887) != 0)) {
          setState(875);
          antlrcpp::downCast<ColumnExprWinFunctionContext *>(_localctx)->columnArgList = columnExprList();
        }
        setState(878);
        match(HogQLParser::RPAREN);
      }
      setState(881);
      match(HogQLParser::OVER);
      setState(882);
      match(HogQLParser::LPAREN);
      setState(883);
      windowExpr();
      setState(884);
      match(HogQLParser::RPAREN);
      break;
    }

    case 10: {
      _localctx = _tracker.createInstance<ColumnExprWinFunctionTargetContext>(_localctx);
      _ctx = _localctx;
      previousContext = _localctx;
      setState(886);
      identifier();

      setState(887);
      match(HogQLParser::LPAREN);
      setState(889);
      _errHandler->sync(this);

      _la = _input->LA(1);
      if ((((_la & ~ 0x3fULL) == 0) &&
        ((1ULL << _la) & -36169677449216002) != 0) || ((((_la - 64) & ~ 0x3fULL) == 0) &&
        ((1ULL << (_la - 64)) & 723944289947615231) != 0) || ((((_la - 131) & ~ 0x3fULL) == 0) &&
        ((1ULL << (_la - 131)) & 36887) != 0)) {
        setState(888);
        antlrcpp::downCast<ColumnExprWinFunctionTargetContext *>(_localctx)->columnExprs = columnExprList();
      }
      setState(891);
      match(HogQLParser::RPAREN);
      setState(901);
      _errHandler->sync(this);

      _la = _input->LA(1);
      if (_la == HogQLParser::LPAREN) {
        setState(893);
        match(HogQLParser::LPAREN);
        setState(895);
        _errHandler->sync(this);

        switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 111, _ctx)) {
        case 1: {
          setState(894);
          match(HogQLParser::DISTINCT);
          break;
        }

        default:
          break;
        }
        setState(898);
        _errHandler->sync(this);

        _la = _input->LA(1);
        if ((((_la & ~ 0x3fULL) == 0) &&
          ((1ULL << _la) & -36169677449216002) != 0) || ((((_la - 64) & ~ 0x3fULL) == 0) &&
          ((1ULL << (_la - 64)) & 723944289947615231) != 0) || ((((_la - 131) & ~ 0x3fULL) == 0) &&
          ((1ULL << (_la - 131)) & 36887) != 0)) {
          setState(897);
          antlrcpp::downCast<ColumnExprWinFunctionTargetContext *>(_localctx)->columnArgList = columnExprList();
        }
        setState(900);
        match(HogQLParser::RPAREN);
      }
      setState(903);
      match(HogQLParser::OVER);
      setState(904);
      identifier();
      break;
    }

    case 11: {
      _localctx = _tracker.createInstance<ColumnExprFunctionContext>(_localctx);
      _ctx = _localctx;
      previousContext = _localctx;
      setState(906);
      identifier();
      setState(912);
      _errHandler->sync(this);

      switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 115, _ctx)) {
      case 1: {
        setState(907);
        match(HogQLParser::LPAREN);
        setState(909);
        _errHandler->sync(this);

        _la = _input->LA(1);
        if ((((_la & ~ 0x3fULL) == 0) &&
          ((1ULL << _la) & -36169677449216002) != 0) || ((((_la - 64) & ~ 0x3fULL) == 0) &&
          ((1ULL << (_la - 64)) & 723944289947615231) != 0) || ((((_la - 131) & ~ 0x3fULL) == 0) &&
          ((1ULL << (_la - 131)) & 36887) != 0)) {
          setState(908);
          antlrcpp::downCast<ColumnExprFunctionContext *>(_localctx)->columnExprs = columnExprList();
        }
        setState(911);
        match(HogQLParser::RPAREN);
        break;
      }

      default:
        break;
      }
      setState(914);
      match(HogQLParser::LPAREN);
      setState(916);
      _errHandler->sync(this);

      switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 116, _ctx)) {
      case 1: {
        setState(915);
        match(HogQLParser::DISTINCT);
        break;
      }

      default:
        break;
      }
      setState(919);
      _errHandler->sync(this);

      _la = _input->LA(1);
      if ((((_la & ~ 0x3fULL) == 0) &&
        ((1ULL << _la) & -36169677449216002) != 0) || ((((_la - 64) & ~ 0x3fULL) == 0) &&
        ((1ULL << (_la - 64)) & 723944289947615231) != 0) || ((((_la - 131) & ~ 0x3fULL) == 0) &&
        ((1ULL << (_la - 131)) & 36887) != 0)) {
        setState(918);
        antlrcpp::downCast<ColumnExprFunctionContext *>(_localctx)->columnArgList = columnExprList();
      }
      setState(921);
      match(HogQLParser::RPAREN);
      break;
    }

    case 12: {
      _localctx = _tracker.createInstance<ColumnExprTagElementContext>(_localctx);
      _ctx = _localctx;
      previousContext = _localctx;
      setState(923);
      hogqlxTagElement();
      break;
    }

    case 13: {
      _localctx = _tracker.createInstance<ColumnExprTemplateStringContext>(_localctx);
      _ctx = _localctx;
      previousContext = _localctx;
      setState(924);
      templateString();
      break;
    }

    case 14: {
      _localctx = _tracker.createInstance<ColumnExprLiteralContext>(_localctx);
      _ctx = _localctx;
      previousContext = _localctx;
      setState(925);
      literal();
      break;
    }

    case 15: {
      _localctx = _tracker.createInstance<ColumnExprNegateContext>(_localctx);
      _ctx = _localctx;
      previousContext = _localctx;
      setState(926);
      match(HogQLParser::DASH);
      setState(927);
      columnExpr(20);
      break;
    }

    case 16: {
      _localctx = _tracker.createInstance<ColumnExprNotContext>(_localctx);
      _ctx = _localctx;
      previousContext = _localctx;
      setState(928);
      match(HogQLParser::NOT);
      setState(929);
      columnExpr(14);
      break;
    }

    case 17: {
      _localctx = _tracker.createInstance<ColumnExprAsteriskContext>(_localctx);
      _ctx = _localctx;
      previousContext = _localctx;
      setState(933);
      _errHandler->sync(this);

      _la = _input->LA(1);
      if ((((_la & ~ 0x3fULL) == 0) &&
        ((1ULL << _la) & -5800812384855539714) != 0) || ((((_la - 64) & ~ 0x3fULL) == 0) &&
        ((1ULL << (_la - 64)) & 25834219896831) != 0)) {
        setState(930);
        tableIdentifier();
        setState(931);
        match(HogQLParser::DOT);
      }
      setState(935);
      match(HogQLParser::ASTERISK);
      break;
    }

    case 18: {
      _localctx = _tracker.createInstance<ColumnExprSubqueryContext>(_localctx);
      _ctx = _localctx;
      previousContext = _localctx;
      setState(936);
      match(HogQLParser::LPAREN);
      setState(937);
      selectSetStmt();
      setState(938);
      match(HogQLParser::RPAREN);
      break;
    }

    case 19: {
      _localctx = _tracker.createInstance<ColumnExprParensContext>(_localctx);
      _ctx = _localctx;
      previousContext = _localctx;
      setState(940);
      match(HogQLParser::LPAREN);
      setState(941);
      columnExpr(0);
      setState(942);
      match(HogQLParser::RPAREN);
      break;
    }

    case 20: {
      _localctx = _tracker.createInstance<ColumnExprTupleContext>(_localctx);
      _ctx = _localctx;
      previousContext = _localctx;
      setState(944);
      match(HogQLParser::LPAREN);
      setState(945);
      columnExprList();
      setState(946);
      match(HogQLParser::RPAREN);
      break;
    }

    case 21: {
      _localctx = _tracker.createInstance<ColumnExprArrayContext>(_localctx);
      _ctx = _localctx;
      previousContext = _localctx;
      setState(948);
      match(HogQLParser::LBRACKET);
      setState(950);
      _errHandler->sync(this);

      _la = _input->LA(1);
      if ((((_la & ~ 0x3fULL) == 0) &&
        ((1ULL << _la) & -36169677449216002) != 0) || ((((_la - 64) & ~ 0x3fULL) == 0) &&
        ((1ULL << (_la - 64)) & 723944289947615231) != 0) || ((((_la - 131) & ~ 0x3fULL) == 0) &&
        ((1ULL << (_la - 131)) & 36887) != 0)) {
        setState(949);
        columnExprList();
      }
      setState(952);
      match(HogQLParser::RBRACKET);
      break;
    }

    case 22: {
      _localctx = _tracker.createInstance<ColumnExprDictContext>(_localctx);
      _ctx = _localctx;
      previousContext = _localctx;
      setState(953);
      match(HogQLParser::LBRACE);
      setState(955);
      _errHandler->sync(this);

      _la = _input->LA(1);
      if ((((_la & ~ 0x3fULL) == 0) &&
        ((1ULL << _la) & -36169677449216002) != 0) || ((((_la - 64) & ~ 0x3fULL) == 0) &&
        ((1ULL << (_la - 64)) & 723944289947615231) != 0) || ((((_la - 131) & ~ 0x3fULL) == 0) &&
        ((1ULL << (_la - 131)) & 36887) != 0)) {
        setState(954);
        kvPairList();
      }
      setState(957);
      match(HogQLParser::RBRACE);
      break;
    }

    case 23: {
      _localctx = _tracker.createInstance<ColumnExprLambdaContext>(_localctx);
      _ctx = _localctx;
      previousContext = _localctx;
      setState(958);
      columnLambdaExpr();
      break;
    }

    case 24: {
      _localctx = _tracker.createInstance<ColumnExprIdentifierContext>(_localctx);
      _ctx = _localctx;
      previousContext = _localctx;
      setState(959);
      columnIdentifier();
      break;
    }

    default:
      break;
    }
    _ctx->stop = _input->LT(-1);
    setState(1077);
    _errHandler->sync(this);
    alt = getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 133, _ctx);
    while (alt != 2 && alt != atn::ATN::INVALID_ALT_NUMBER) {
      if (alt == 1) {
        if (!_parseListeners.empty())
          triggerExitRuleEvent();
        previousContext = _localctx;
        setState(1075);
        _errHandler->sync(this);
        switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 132, _ctx)) {
        case 1: {
          auto newContext = _tracker.createInstance<ColumnExprPrecedence1Context>(_tracker.createInstance<ColumnExprContext>(parentContext, parentState));
          _localctx = newContext;
          newContext->left = previousContext;
          pushNewRecursionContext(newContext, startState, RuleColumnExpr);
          setState(962);

          if (!(precpred(_ctx, 19))) throw FailedPredicateException(this, "precpred(_ctx, 19)");
          setState(966);
          _errHandler->sync(this);
          switch (_input->LA(1)) {
            case HogQLParser::ASTERISK: {
              setState(963);
              antlrcpp::downCast<ColumnExprPrecedence1Context *>(_localctx)->operator_ = match(HogQLParser::ASTERISK);
              break;
            }

            case HogQLParser::SLASH: {
              setState(964);
              antlrcpp::downCast<ColumnExprPrecedence1Context *>(_localctx)->operator_ = match(HogQLParser::SLASH);
              break;
            }

            case HogQLParser::PERCENT: {
              setState(965);
              antlrcpp::downCast<ColumnExprPrecedence1Context *>(_localctx)->operator_ = match(HogQLParser::PERCENT);
              break;
            }

          default:
            throw NoViableAltException(this);
          }
          setState(968);
          antlrcpp::downCast<ColumnExprPrecedence1Context *>(_localctx)->right = columnExpr(20);
          break;
        }

        case 2: {
          auto newContext = _tracker.createInstance<ColumnExprPrecedence2Context>(_tracker.createInstance<ColumnExprContext>(parentContext, parentState));
          _localctx = newContext;
          newContext->left = previousContext;
          pushNewRecursionContext(newContext, startState, RuleColumnExpr);
          setState(969);

          if (!(precpred(_ctx, 18))) throw FailedPredicateException(this, "precpred(_ctx, 18)");
          setState(973);
          _errHandler->sync(this);
          switch (_input->LA(1)) {
            case HogQLParser::PLUS: {
              setState(970);
              antlrcpp::downCast<ColumnExprPrecedence2Context *>(_localctx)->operator_ = match(HogQLParser::PLUS);
              break;
            }

            case HogQLParser::DASH: {
              setState(971);
              antlrcpp::downCast<ColumnExprPrecedence2Context *>(_localctx)->operator_ = match(HogQLParser::DASH);
              break;
            }

            case HogQLParser::CONCAT: {
              setState(972);
              antlrcpp::downCast<ColumnExprPrecedence2Context *>(_localctx)->operator_ = match(HogQLParser::CONCAT);
              break;
            }

          default:
            throw NoViableAltException(this);
          }
          setState(975);
          antlrcpp::downCast<ColumnExprPrecedence2Context *>(_localctx)->right = columnExpr(19);
          break;
        }

        case 3: {
          auto newContext = _tracker.createInstance<ColumnExprPrecedence3Context>(_tracker.createInstance<ColumnExprContext>(parentContext, parentState));
          _localctx = newContext;
          newContext->left = previousContext;
          pushNewRecursionContext(newContext, startState, RuleColumnExpr);
          setState(976);

          if (!(precpred(_ctx, 17))) throw FailedPredicateException(this, "precpred(_ctx, 17)");
          setState(1001);
          _errHandler->sync(this);
          switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 127, _ctx)) {
          case 1: {
            setState(977);
            antlrcpp::downCast<ColumnExprPrecedence3Context *>(_localctx)->operator_ = match(HogQLParser::EQ_DOUBLE);
            break;
          }

          case 2: {
            setState(978);
            antlrcpp::downCast<ColumnExprPrecedence3Context *>(_localctx)->operator_ = match(HogQLParser::EQ_SINGLE);
            break;
          }

          case 3: {
            setState(979);
            antlrcpp::downCast<ColumnExprPrecedence3Context *>(_localctx)->operator_ = match(HogQLParser::NOT_EQ);
            break;
          }

          case 4: {
            setState(980);
            antlrcpp::downCast<ColumnExprPrecedence3Context *>(_localctx)->operator_ = match(HogQLParser::LT_EQ);
            break;
          }

          case 5: {
            setState(981);
            antlrcpp::downCast<ColumnExprPrecedence3Context *>(_localctx)->operator_ = match(HogQLParser::LT);
            break;
          }

          case 6: {
            setState(982);
            antlrcpp::downCast<ColumnExprPrecedence3Context *>(_localctx)->operator_ = match(HogQLParser::GT_EQ);
            break;
          }

          case 7: {
            setState(983);
            antlrcpp::downCast<ColumnExprPrecedence3Context *>(_localctx)->operator_ = match(HogQLParser::GT);
            break;
          }

          case 8: {
            setState(985);
            _errHandler->sync(this);

            _la = _input->LA(1);
            if (_la == HogQLParser::NOT) {
              setState(984);
              antlrcpp::downCast<ColumnExprPrecedence3Context *>(_localctx)->operator_ = match(HogQLParser::NOT);
            }
            setState(987);
            match(HogQLParser::IN);
            setState(989);
            _errHandler->sync(this);

            switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 125, _ctx)) {
            case 1: {
              setState(988);
              match(HogQLParser::COHORT);
              break;
            }

            default:
              break;
            }
            break;
          }

          case 9: {
            setState(992);
            _errHandler->sync(this);

            _la = _input->LA(1);
            if (_la == HogQLParser::NOT) {
              setState(991);
              antlrcpp::downCast<ColumnExprPrecedence3Context *>(_localctx)->operator_ = match(HogQLParser::NOT);
            }
            setState(994);
            _la = _input->LA(1);
            if (!(_la == HogQLParser::ILIKE

            || _la == HogQLParser::LIKE)) {
            _errHandler->recoverInline(this);
            }
            else {
              _errHandler->reportMatch(this);
              consume();
            }
            break;
          }

          case 10: {
            setState(995);
            antlrcpp::downCast<ColumnExprPrecedence3Context *>(_localctx)->operator_ = match(HogQLParser::REGEX_SINGLE);
            break;
          }

          case 11: {
            setState(996);
            antlrcpp::downCast<ColumnExprPrecedence3Context *>(_localctx)->operator_ = match(HogQLParser::REGEX_DOUBLE);
            break;
          }

          case 12: {
            setState(997);
            antlrcpp::downCast<ColumnExprPrecedence3Context *>(_localctx)->operator_ = match(HogQLParser::NOT_REGEX);
            break;
          }

          case 13: {
            setState(998);
            antlrcpp::downCast<ColumnExprPrecedence3Context *>(_localctx)->operator_ = match(HogQLParser::IREGEX_SINGLE);
            break;
          }

          case 14: {
            setState(999);
            antlrcpp::downCast<ColumnExprPrecedence3Context *>(_localctx)->operator_ = match(HogQLParser::IREGEX_DOUBLE);
            break;
          }

          case 15: {
            setState(1000);
            antlrcpp::downCast<ColumnExprPrecedence3Context *>(_localctx)->operator_ = match(HogQLParser::NOT_IREGEX);
            break;
          }

          default:
            break;
          }
          setState(1003);
          antlrcpp::downCast<ColumnExprPrecedence3Context *>(_localctx)->right = columnExpr(18);
          break;
        }

        case 4: {
          auto newContext = _tracker.createInstance<ColumnExprNullishContext>(_tracker.createInstance<ColumnExprContext>(parentContext, parentState));
          _localctx = newContext;
          pushNewRecursionContext(newContext, startState, RuleColumnExpr);
          setState(1004);

          if (!(precpred(_ctx, 15))) throw FailedPredicateException(this, "precpred(_ctx, 15)");
          setState(1005);
          match(HogQLParser::NULLISH);
          setState(1006);
          columnExpr(16);
          break;
        }

        case 5: {
          auto newContext = _tracker.createInstance<ColumnExprAndContext>(_tracker.createInstance<ColumnExprContext>(parentContext, parentState));
          _localctx = newContext;
          pushNewRecursionContext(newContext, startState, RuleColumnExpr);
          setState(1007);

          if (!(precpred(_ctx, 13))) throw FailedPredicateException(this, "precpred(_ctx, 13)");
          setState(1008);
          match(HogQLParser::AND);
          setState(1009);
          columnExpr(14);
          break;
        }

        case 6: {
          auto newContext = _tracker.createInstance<ColumnExprOrContext>(_tracker.createInstance<ColumnExprContext>(parentContext, parentState));
          _localctx = newContext;
          pushNewRecursionContext(newContext, startState, RuleColumnExpr);
          setState(1010);

          if (!(precpred(_ctx, 12))) throw FailedPredicateException(this, "precpred(_ctx, 12)");
          setState(1011);
          match(HogQLParser::OR);
          setState(1012);
          columnExpr(13);
          break;
        }

        case 7: {
          auto newContext = _tracker.createInstance<ColumnExprBetweenContext>(_tracker.createInstance<ColumnExprContext>(parentContext, parentState));
          _localctx = newContext;
          pushNewRecursionContext(newContext, startState, RuleColumnExpr);
          setState(1013);

          if (!(precpred(_ctx, 11))) throw FailedPredicateException(this, "precpred(_ctx, 11)");
          setState(1015);
          _errHandler->sync(this);

          _la = _input->LA(1);
          if (_la == HogQLParser::NOT) {
            setState(1014);
            match(HogQLParser::NOT);
          }
          setState(1017);
          match(HogQLParser::BETWEEN);
          setState(1018);
          columnExpr(0);
          setState(1019);
          match(HogQLParser::AND);
          setState(1020);
          columnExpr(12);
          break;
        }

        case 8: {
          auto newContext = _tracker.createInstance<ColumnExprTernaryOpContext>(_tracker.createInstance<ColumnExprContext>(parentContext, parentState));
          _localctx = newContext;
          pushNewRecursionContext(newContext, startState, RuleColumnExpr);
          setState(1022);

          if (!(precpred(_ctx, 10))) throw FailedPredicateException(this, "precpred(_ctx, 10)");
          setState(1023);
          match(HogQLParser::QUERY);
          setState(1024);
          columnExpr(0);
          setState(1025);
          match(HogQLParser::COLON);
          setState(1026);
          columnExpr(10);
          break;
        }

        case 9: {
          auto newContext = _tracker.createInstance<ColumnExprCallSelectContext>(_tracker.createInstance<ColumnExprContext>(parentContext, parentState));
          _localctx = newContext;
          pushNewRecursionContext(newContext, startState, RuleColumnExpr);
          setState(1028);

          if (!(precpred(_ctx, 31))) throw FailedPredicateException(this, "precpred(_ctx, 31)");
          setState(1029);
          match(HogQLParser::LPAREN);
          setState(1030);
          selectSetStmt();
          setState(1031);
          match(HogQLParser::RPAREN);
          break;
        }

        case 10: {
          auto newContext = _tracker.createInstance<ColumnExprCallContext>(_tracker.createInstance<ColumnExprContext>(parentContext, parentState));
          _localctx = newContext;
          pushNewRecursionContext(newContext, startState, RuleColumnExpr);
          setState(1033);

          if (!(precpred(_ctx, 30))) throw FailedPredicateException(this, "precpred(_ctx, 30)");
          setState(1034);
          match(HogQLParser::LPAREN);
          setState(1036);
          _errHandler->sync(this);

          _la = _input->LA(1);
          if ((((_la & ~ 0x3fULL) == 0) &&
            ((1ULL << _la) & -36169677449216002) != 0) || ((((_la - 64) & ~ 0x3fULL) == 0) &&
            ((1ULL << (_la - 64)) & 723944289947615231) != 0) || ((((_la - 131) & ~ 0x3fULL) == 0) &&
            ((1ULL << (_la - 131)) & 36887) != 0)) {
            setState(1035);
            columnExprList();
          }
          setState(1038);
          match(HogQLParser::RPAREN);
          break;
        }

        case 11: {
          auto newContext = _tracker.createInstance<ColumnExprArrayAccessContext>(_tracker.createInstance<ColumnExprContext>(parentContext, parentState));
          _localctx = newContext;
          pushNewRecursionContext(newContext, startState, RuleColumnExpr);
          setState(1039);

          if (!(precpred(_ctx, 26))) throw FailedPredicateException(this, "precpred(_ctx, 26)");
          setState(1040);
          match(HogQLParser::LBRACKET);
          setState(1041);
          columnExpr(0);
          setState(1042);
          match(HogQLParser::RBRACKET);
          break;
        }

        case 12: {
          auto newContext = _tracker.createInstance<ColumnExprTupleAccessContext>(_tracker.createInstance<ColumnExprContext>(parentContext, parentState));
          _localctx = newContext;
          pushNewRecursionContext(newContext, startState, RuleColumnExpr);
          setState(1044);

          if (!(precpred(_ctx, 25))) throw FailedPredicateException(this, "precpred(_ctx, 25)");
          setState(1045);
          match(HogQLParser::DOT);
          setState(1046);
          match(HogQLParser::DECIMAL_LITERAL);
          break;
        }

        case 13: {
          auto newContext = _tracker.createInstance<ColumnExprPropertyAccessContext>(_tracker.createInstance<ColumnExprContext>(parentContext, parentState));
          _localctx = newContext;
          pushNewRecursionContext(newContext, startState, RuleColumnExpr);
          setState(1047);

          if (!(precpred(_ctx, 24))) throw FailedPredicateException(this, "precpred(_ctx, 24)");
          setState(1048);
          match(HogQLParser::DOT);
          setState(1049);
          identifier();
          break;
        }

        case 14: {
          auto newContext = _tracker.createInstance<ColumnExprNullArrayAccessContext>(_tracker.createInstance<ColumnExprContext>(parentContext, parentState));
          _localctx = newContext;
          pushNewRecursionContext(newContext, startState, RuleColumnExpr);
          setState(1050);

          if (!(precpred(_ctx, 23))) throw FailedPredicateException(this, "precpred(_ctx, 23)");
          setState(1051);
          match(HogQLParser::NULL_PROPERTY);
          setState(1052);
          match(HogQLParser::LBRACKET);
          setState(1053);
          columnExpr(0);
          setState(1054);
          match(HogQLParser::RBRACKET);
          break;
        }

        case 15: {
          auto newContext = _tracker.createInstance<ColumnExprNullTupleAccessContext>(_tracker.createInstance<ColumnExprContext>(parentContext, parentState));
          _localctx = newContext;
          pushNewRecursionContext(newContext, startState, RuleColumnExpr);
          setState(1056);

          if (!(precpred(_ctx, 22))) throw FailedPredicateException(this, "precpred(_ctx, 22)");
          setState(1057);
          match(HogQLParser::NULL_PROPERTY);
          setState(1058);
          match(HogQLParser::DECIMAL_LITERAL);
          break;
        }

        case 16: {
          auto newContext = _tracker.createInstance<ColumnExprNullPropertyAccessContext>(_tracker.createInstance<ColumnExprContext>(parentContext, parentState));
          _localctx = newContext;
          pushNewRecursionContext(newContext, startState, RuleColumnExpr);
          setState(1059);

          if (!(precpred(_ctx, 21))) throw FailedPredicateException(this, "precpred(_ctx, 21)");
          setState(1060);
          match(HogQLParser::NULL_PROPERTY);
          setState(1061);
          identifier();
          break;
        }

        case 17: {
          auto newContext = _tracker.createInstance<ColumnExprIsNullContext>(_tracker.createInstance<ColumnExprContext>(parentContext, parentState));
          _localctx = newContext;
          pushNewRecursionContext(newContext, startState, RuleColumnExpr);
          setState(1062);

          if (!(precpred(_ctx, 16))) throw FailedPredicateException(this, "precpred(_ctx, 16)");
          setState(1063);
          match(HogQLParser::IS);
          setState(1065);
          _errHandler->sync(this);

          _la = _input->LA(1);
          if (_la == HogQLParser::NOT) {
            setState(1064);
            match(HogQLParser::NOT);
          }
          setState(1067);
          match(HogQLParser::NULL_SQL);
          break;
        }

        case 18: {
          auto newContext = _tracker.createInstance<ColumnExprAliasContext>(_tracker.createInstance<ColumnExprContext>(parentContext, parentState));
          _localctx = newContext;
          pushNewRecursionContext(newContext, startState, RuleColumnExpr);
          setState(1068);

          if (!(precpred(_ctx, 9))) throw FailedPredicateException(this, "precpred(_ctx, 9)");
          setState(1073);
          _errHandler->sync(this);
          switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 131, _ctx)) {
          case 1: {
            setState(1069);
            match(HogQLParser::AS);
            setState(1070);
            identifier();
            break;
          }

          case 2: {
            setState(1071);
            match(HogQLParser::AS);
            setState(1072);
            match(HogQLParser::STRING_LITERAL);
            break;
          }

          default:
            break;
          }
          break;
        }

        default:
          break;
        } 
      }
      setState(1079);
      _errHandler->sync(this);
      alt = getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 133, _ctx);
    }
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }
  return _localctx;
}

//----------------- ColumnLambdaExprContext ------------------------------------------------------------------

HogQLParser::ColumnLambdaExprContext::ColumnLambdaExprContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

tree::TerminalNode* HogQLParser::ColumnLambdaExprContext::ARROW() {
  return getToken(HogQLParser::ARROW, 0);
}

tree::TerminalNode* HogQLParser::ColumnLambdaExprContext::LPAREN() {
  return getToken(HogQLParser::LPAREN, 0);
}

std::vector<HogQLParser::IdentifierContext *> HogQLParser::ColumnLambdaExprContext::identifier() {
  return getRuleContexts<HogQLParser::IdentifierContext>();
}

HogQLParser::IdentifierContext* HogQLParser::ColumnLambdaExprContext::identifier(size_t i) {
  return getRuleContext<HogQLParser::IdentifierContext>(i);
}

tree::TerminalNode* HogQLParser::ColumnLambdaExprContext::RPAREN() {
  return getToken(HogQLParser::RPAREN, 0);
}

HogQLParser::ColumnExprContext* HogQLParser::ColumnLambdaExprContext::columnExpr() {
  return getRuleContext<HogQLParser::ColumnExprContext>(0);
}

HogQLParser::BlockContext* HogQLParser::ColumnLambdaExprContext::block() {
  return getRuleContext<HogQLParser::BlockContext>(0);
}

std::vector<tree::TerminalNode *> HogQLParser::ColumnLambdaExprContext::COMMA() {
  return getTokens(HogQLParser::COMMA);
}

tree::TerminalNode* HogQLParser::ColumnLambdaExprContext::COMMA(size_t i) {
  return getToken(HogQLParser::COMMA, i);
}


size_t HogQLParser::ColumnLambdaExprContext::getRuleIndex() const {
  return HogQLParser::RuleColumnLambdaExpr;
}


std::any HogQLParser::ColumnLambdaExprContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
    return parserVisitor->visitColumnLambdaExpr(this);
  else
    return visitor->visitChildren(this);
}

HogQLParser::ColumnLambdaExprContext* HogQLParser::columnLambdaExpr() {
  ColumnLambdaExprContext *_localctx = _tracker.createInstance<ColumnLambdaExprContext>(_ctx, getState());
  enterRule(_localctx, 124, HogQLParser::RuleColumnLambdaExpr);
  size_t _la = 0;

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    size_t alt;
    enterOuterAlt(_localctx, 1);
    setState(1107);
    _errHandler->sync(this);
    switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 138, _ctx)) {
    case 1: {
      setState(1080);
      match(HogQLParser::LPAREN);
      setState(1081);
      identifier();
      setState(1086);
      _errHandler->sync(this);
      alt = getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 134, _ctx);
      while (alt != 2 && alt != atn::ATN::INVALID_ALT_NUMBER) {
        if (alt == 1) {
          setState(1082);
          match(HogQLParser::COMMA);
          setState(1083);
          identifier(); 
        }
        setState(1088);
        _errHandler->sync(this);
        alt = getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 134, _ctx);
      }
      setState(1090);
      _errHandler->sync(this);

      _la = _input->LA(1);
      if (_la == HogQLParser::COMMA) {
        setState(1089);
        match(HogQLParser::COMMA);
      }
      setState(1092);
      match(HogQLParser::RPAREN);
      break;
    }

    case 2: {
      setState(1094);
      identifier();
      setState(1099);
      _errHandler->sync(this);
      alt = getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 136, _ctx);
      while (alt != 2 && alt != atn::ATN::INVALID_ALT_NUMBER) {
        if (alt == 1) {
          setState(1095);
          match(HogQLParser::COMMA);
          setState(1096);
          identifier(); 
        }
        setState(1101);
        _errHandler->sync(this);
        alt = getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 136, _ctx);
      }
      setState(1103);
      _errHandler->sync(this);

      _la = _input->LA(1);
      if (_la == HogQLParser::COMMA) {
        setState(1102);
        match(HogQLParser::COMMA);
      }
      break;
    }

    case 3: {
      setState(1105);
      match(HogQLParser::LPAREN);
      setState(1106);
      match(HogQLParser::RPAREN);
      break;
    }

    default:
      break;
    }
    setState(1109);
    match(HogQLParser::ARROW);
    setState(1112);
    _errHandler->sync(this);
    switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 139, _ctx)) {
    case 1: {
      setState(1110);
      columnExpr(0);
      break;
    }

    case 2: {
      setState(1111);
      block();
      break;
    }

    default:
      break;
    }
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- HogqlxChildElementContext ------------------------------------------------------------------

HogQLParser::HogqlxChildElementContext::HogqlxChildElementContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

HogQLParser::HogqlxTagElementContext* HogQLParser::HogqlxChildElementContext::hogqlxTagElement() {
  return getRuleContext<HogQLParser::HogqlxTagElementContext>(0);
}

HogQLParser::HogqlxTextContext* HogQLParser::HogqlxChildElementContext::hogqlxText() {
  return getRuleContext<HogQLParser::HogqlxTextContext>(0);
}

tree::TerminalNode* HogQLParser::HogqlxChildElementContext::LBRACE() {
  return getToken(HogQLParser::LBRACE, 0);
}

HogQLParser::ColumnExprContext* HogQLParser::HogqlxChildElementContext::columnExpr() {
  return getRuleContext<HogQLParser::ColumnExprContext>(0);
}

tree::TerminalNode* HogQLParser::HogqlxChildElementContext::RBRACE() {
  return getToken(HogQLParser::RBRACE, 0);
}


size_t HogQLParser::HogqlxChildElementContext::getRuleIndex() const {
  return HogQLParser::RuleHogqlxChildElement;
}


std::any HogQLParser::HogqlxChildElementContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
    return parserVisitor->visitHogqlxChildElement(this);
  else
    return visitor->visitChildren(this);
}

HogQLParser::HogqlxChildElementContext* HogQLParser::hogqlxChildElement() {
  HogqlxChildElementContext *_localctx = _tracker.createInstance<HogqlxChildElementContext>(_ctx, getState());
  enterRule(_localctx, 126, HogQLParser::RuleHogqlxChildElement);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    setState(1120);
    _errHandler->sync(this);
    switch (_input->LA(1)) {
      case HogQLParser::LT: {
        enterOuterAlt(_localctx, 1);
        setState(1114);
        hogqlxTagElement();
        break;
      }

      case HogQLParser::HOGQLX_TEXT_TEXT: {
        enterOuterAlt(_localctx, 2);
        setState(1115);
        hogqlxText();
        break;
      }

      case HogQLParser::LBRACE: {
        enterOuterAlt(_localctx, 3);
        setState(1116);
        match(HogQLParser::LBRACE);
        setState(1117);
        columnExpr(0);
        setState(1118);
        match(HogQLParser::RBRACE);
        break;
      }

    default:
      throw NoViableAltException(this);
    }
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- HogqlxTextContext ------------------------------------------------------------------

HogQLParser::HogqlxTextContext::HogqlxTextContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

tree::TerminalNode* HogQLParser::HogqlxTextContext::HOGQLX_TEXT_TEXT() {
  return getToken(HogQLParser::HOGQLX_TEXT_TEXT, 0);
}


size_t HogQLParser::HogqlxTextContext::getRuleIndex() const {
  return HogQLParser::RuleHogqlxText;
}


std::any HogQLParser::HogqlxTextContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
    return parserVisitor->visitHogqlxText(this);
  else
    return visitor->visitChildren(this);
}

HogQLParser::HogqlxTextContext* HogQLParser::hogqlxText() {
  HogqlxTextContext *_localctx = _tracker.createInstance<HogqlxTextContext>(_ctx, getState());
  enterRule(_localctx, 128, HogQLParser::RuleHogqlxText);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(1122);
    match(HogQLParser::HOGQLX_TEXT_TEXT);
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- HogqlxTagElementContext ------------------------------------------------------------------

HogQLParser::HogqlxTagElementContext::HogqlxTagElementContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}


size_t HogQLParser::HogqlxTagElementContext::getRuleIndex() const {
  return HogQLParser::RuleHogqlxTagElement;
}

void HogQLParser::HogqlxTagElementContext::copyFrom(HogqlxTagElementContext *ctx) {
  ParserRuleContext::copyFrom(ctx);
}

//----------------- HogqlxTagElementClosedContext ------------------------------------------------------------------

tree::TerminalNode* HogQLParser::HogqlxTagElementClosedContext::LT() {
  return getToken(HogQLParser::LT, 0);
}

HogQLParser::IdentifierContext* HogQLParser::HogqlxTagElementClosedContext::identifier() {
  return getRuleContext<HogQLParser::IdentifierContext>(0);
}

tree::TerminalNode* HogQLParser::HogqlxTagElementClosedContext::SLASH_GT() {
  return getToken(HogQLParser::SLASH_GT, 0);
}

std::vector<HogQLParser::HogqlxTagAttributeContext *> HogQLParser::HogqlxTagElementClosedContext::hogqlxTagAttribute() {
  return getRuleContexts<HogQLParser::HogqlxTagAttributeContext>();
}

HogQLParser::HogqlxTagAttributeContext* HogQLParser::HogqlxTagElementClosedContext::hogqlxTagAttribute(size_t i) {
  return getRuleContext<HogQLParser::HogqlxTagAttributeContext>(i);
}

HogQLParser::HogqlxTagElementClosedContext::HogqlxTagElementClosedContext(HogqlxTagElementContext *ctx) { copyFrom(ctx); }


std::any HogQLParser::HogqlxTagElementClosedContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
    return parserVisitor->visitHogqlxTagElementClosed(this);
  else
    return visitor->visitChildren(this);
}
//----------------- HogqlxTagElementNestedContext ------------------------------------------------------------------

tree::TerminalNode* HogQLParser::HogqlxTagElementNestedContext::LT() {
  return getToken(HogQLParser::LT, 0);
}

std::vector<HogQLParser::IdentifierContext *> HogQLParser::HogqlxTagElementNestedContext::identifier() {
  return getRuleContexts<HogQLParser::IdentifierContext>();
}

HogQLParser::IdentifierContext* HogQLParser::HogqlxTagElementNestedContext::identifier(size_t i) {
  return getRuleContext<HogQLParser::IdentifierContext>(i);
}

std::vector<tree::TerminalNode *> HogQLParser::HogqlxTagElementNestedContext::GT() {
  return getTokens(HogQLParser::GT);
}

tree::TerminalNode* HogQLParser::HogqlxTagElementNestedContext::GT(size_t i) {
  return getToken(HogQLParser::GT, i);
}

tree::TerminalNode* HogQLParser::HogqlxTagElementNestedContext::LT_SLASH() {
  return getToken(HogQLParser::LT_SLASH, 0);
}

std::vector<HogQLParser::HogqlxTagAttributeContext *> HogQLParser::HogqlxTagElementNestedContext::hogqlxTagAttribute() {
  return getRuleContexts<HogQLParser::HogqlxTagAttributeContext>();
}

HogQLParser::HogqlxTagAttributeContext* HogQLParser::HogqlxTagElementNestedContext::hogqlxTagAttribute(size_t i) {
  return getRuleContext<HogQLParser::HogqlxTagAttributeContext>(i);
}

std::vector<HogQLParser::HogqlxChildElementContext *> HogQLParser::HogqlxTagElementNestedContext::hogqlxChildElement() {
  return getRuleContexts<HogQLParser::HogqlxChildElementContext>();
}

HogQLParser::HogqlxChildElementContext* HogQLParser::HogqlxTagElementNestedContext::hogqlxChildElement(size_t i) {
  return getRuleContext<HogQLParser::HogqlxChildElementContext>(i);
}

HogQLParser::HogqlxTagElementNestedContext::HogqlxTagElementNestedContext(HogqlxTagElementContext *ctx) { copyFrom(ctx); }


std::any HogQLParser::HogqlxTagElementNestedContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
    return parserVisitor->visitHogqlxTagElementNested(this);
  else
    return visitor->visitChildren(this);
}
HogQLParser::HogqlxTagElementContext* HogQLParser::hogqlxTagElement() {
  HogqlxTagElementContext *_localctx = _tracker.createInstance<HogqlxTagElementContext>(_ctx, getState());
  enterRule(_localctx, 130, HogQLParser::RuleHogqlxTagElement);
  size_t _la = 0;

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    setState(1153);
    _errHandler->sync(this);
    switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 144, _ctx)) {
    case 1: {
      _localctx = _tracker.createInstance<HogQLParser::HogqlxTagElementClosedContext>(_localctx);
      enterOuterAlt(_localctx, 1);
      setState(1124);
      match(HogQLParser::LT);
      setState(1125);
      identifier();
      setState(1129);
      _errHandler->sync(this);
      _la = _input->LA(1);
      while ((((_la & ~ 0x3fULL) == 0) &&
        ((1ULL << _la) & -5800812384855539714) != 0) || ((((_la - 64) & ~ 0x3fULL) == 0) &&
        ((1ULL << (_la - 64)) & 25834219896831) != 0)) {
        setState(1126);
        hogqlxTagAttribute();
        setState(1131);
        _errHandler->sync(this);
        _la = _input->LA(1);
      }
      setState(1132);
      match(HogQLParser::SLASH_GT);
      break;
    }

    case 2: {
      _localctx = _tracker.createInstance<HogQLParser::HogqlxTagElementNestedContext>(_localctx);
      enterOuterAlt(_localctx, 2);
      setState(1134);
      match(HogQLParser::LT);
      setState(1135);
      identifier();
      setState(1139);
      _errHandler->sync(this);
      _la = _input->LA(1);
      while ((((_la & ~ 0x3fULL) == 0) &&
        ((1ULL << _la) & -5800812384855539714) != 0) || ((((_la - 64) & ~ 0x3fULL) == 0) &&
        ((1ULL << (_la - 64)) & 25834219896831) != 0)) {
        setState(1136);
        hogqlxTagAttribute();
        setState(1141);
        _errHandler->sync(this);
        _la = _input->LA(1);
      }
      setState(1142);
      match(HogQLParser::GT);
      setState(1146);
      _errHandler->sync(this);
      _la = _input->LA(1);
      while (((((_la - 131) & ~ 0x3fULL) == 0) &&
        ((1ULL << (_la - 131)) & 68719476753) != 0)) {
        setState(1143);
        hogqlxChildElement();
        setState(1148);
        _errHandler->sync(this);
        _la = _input->LA(1);
      }
      setState(1149);
      match(HogQLParser::LT_SLASH);
      setState(1150);
      identifier();
      setState(1151);
      match(HogQLParser::GT);
      break;
    }

    default:
      break;
    }
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- HogqlxTagAttributeContext ------------------------------------------------------------------

HogQLParser::HogqlxTagAttributeContext::HogqlxTagAttributeContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

HogQLParser::IdentifierContext* HogQLParser::HogqlxTagAttributeContext::identifier() {
  return getRuleContext<HogQLParser::IdentifierContext>(0);
}

tree::TerminalNode* HogQLParser::HogqlxTagAttributeContext::EQ_SINGLE() {
  return getToken(HogQLParser::EQ_SINGLE, 0);
}

HogQLParser::StringContext* HogQLParser::HogqlxTagAttributeContext::string() {
  return getRuleContext<HogQLParser::StringContext>(0);
}

tree::TerminalNode* HogQLParser::HogqlxTagAttributeContext::LBRACE() {
  return getToken(HogQLParser::LBRACE, 0);
}

HogQLParser::ColumnExprContext* HogQLParser::HogqlxTagAttributeContext::columnExpr() {
  return getRuleContext<HogQLParser::ColumnExprContext>(0);
}

tree::TerminalNode* HogQLParser::HogqlxTagAttributeContext::RBRACE() {
  return getToken(HogQLParser::RBRACE, 0);
}


size_t HogQLParser::HogqlxTagAttributeContext::getRuleIndex() const {
  return HogQLParser::RuleHogqlxTagAttribute;
}


std::any HogQLParser::HogqlxTagAttributeContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
    return parserVisitor->visitHogqlxTagAttribute(this);
  else
    return visitor->visitChildren(this);
}

HogQLParser::HogqlxTagAttributeContext* HogQLParser::hogqlxTagAttribute() {
  HogqlxTagAttributeContext *_localctx = _tracker.createInstance<HogqlxTagAttributeContext>(_ctx, getState());
  enterRule(_localctx, 132, HogQLParser::RuleHogqlxTagAttribute);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    setState(1166);
    _errHandler->sync(this);
    switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 145, _ctx)) {
    case 1: {
      enterOuterAlt(_localctx, 1);
      setState(1155);
      identifier();
      setState(1156);
      match(HogQLParser::EQ_SINGLE);
      setState(1157);
      string();
      break;
    }

    case 2: {
      enterOuterAlt(_localctx, 2);
      setState(1159);
      identifier();
      setState(1160);
      match(HogQLParser::EQ_SINGLE);
      setState(1161);
      match(HogQLParser::LBRACE);
      setState(1162);
      columnExpr(0);
      setState(1163);
      match(HogQLParser::RBRACE);
      break;
    }

    case 3: {
      enterOuterAlt(_localctx, 3);
      setState(1165);
      identifier();
      break;
    }

    default:
      break;
    }
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- WithExprListContext ------------------------------------------------------------------

HogQLParser::WithExprListContext::WithExprListContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

std::vector<HogQLParser::WithExprContext *> HogQLParser::WithExprListContext::withExpr() {
  return getRuleContexts<HogQLParser::WithExprContext>();
}

HogQLParser::WithExprContext* HogQLParser::WithExprListContext::withExpr(size_t i) {
  return getRuleContext<HogQLParser::WithExprContext>(i);
}

std::vector<tree::TerminalNode *> HogQLParser::WithExprListContext::COMMA() {
  return getTokens(HogQLParser::COMMA);
}

tree::TerminalNode* HogQLParser::WithExprListContext::COMMA(size_t i) {
  return getToken(HogQLParser::COMMA, i);
}


size_t HogQLParser::WithExprListContext::getRuleIndex() const {
  return HogQLParser::RuleWithExprList;
}


std::any HogQLParser::WithExprListContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
    return parserVisitor->visitWithExprList(this);
  else
    return visitor->visitChildren(this);
}

HogQLParser::WithExprListContext* HogQLParser::withExprList() {
  WithExprListContext *_localctx = _tracker.createInstance<WithExprListContext>(_ctx, getState());
  enterRule(_localctx, 134, HogQLParser::RuleWithExprList);
  size_t _la = 0;

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    size_t alt;
    enterOuterAlt(_localctx, 1);
    setState(1168);
    withExpr();
    setState(1173);
    _errHandler->sync(this);
    alt = getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 146, _ctx);
    while (alt != 2 && alt != atn::ATN::INVALID_ALT_NUMBER) {
      if (alt == 1) {
        setState(1169);
        match(HogQLParser::COMMA);
        setState(1170);
        withExpr(); 
      }
      setState(1175);
      _errHandler->sync(this);
      alt = getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 146, _ctx);
    }
    setState(1177);
    _errHandler->sync(this);

    _la = _input->LA(1);
    if (_la == HogQLParser::COMMA) {
      setState(1176);
      match(HogQLParser::COMMA);
    }
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- WithExprContext ------------------------------------------------------------------

HogQLParser::WithExprContext::WithExprContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}


size_t HogQLParser::WithExprContext::getRuleIndex() const {
  return HogQLParser::RuleWithExpr;
}

void HogQLParser::WithExprContext::copyFrom(WithExprContext *ctx) {
  ParserRuleContext::copyFrom(ctx);
}

//----------------- WithExprColumnContext ------------------------------------------------------------------

HogQLParser::ColumnExprContext* HogQLParser::WithExprColumnContext::columnExpr() {
  return getRuleContext<HogQLParser::ColumnExprContext>(0);
}

tree::TerminalNode* HogQLParser::WithExprColumnContext::AS() {
  return getToken(HogQLParser::AS, 0);
}

HogQLParser::IdentifierContext* HogQLParser::WithExprColumnContext::identifier() {
  return getRuleContext<HogQLParser::IdentifierContext>(0);
}

HogQLParser::WithExprColumnContext::WithExprColumnContext(WithExprContext *ctx) { copyFrom(ctx); }


std::any HogQLParser::WithExprColumnContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
    return parserVisitor->visitWithExprColumn(this);
  else
    return visitor->visitChildren(this);
}
//----------------- WithExprSubqueryContext ------------------------------------------------------------------

HogQLParser::IdentifierContext* HogQLParser::WithExprSubqueryContext::identifier() {
  return getRuleContext<HogQLParser::IdentifierContext>(0);
}

tree::TerminalNode* HogQLParser::WithExprSubqueryContext::AS() {
  return getToken(HogQLParser::AS, 0);
}

tree::TerminalNode* HogQLParser::WithExprSubqueryContext::LPAREN() {
  return getToken(HogQLParser::LPAREN, 0);
}

HogQLParser::SelectSetStmtContext* HogQLParser::WithExprSubqueryContext::selectSetStmt() {
  return getRuleContext<HogQLParser::SelectSetStmtContext>(0);
}

tree::TerminalNode* HogQLParser::WithExprSubqueryContext::RPAREN() {
  return getToken(HogQLParser::RPAREN, 0);
}

HogQLParser::WithExprSubqueryContext::WithExprSubqueryContext(WithExprContext *ctx) { copyFrom(ctx); }


std::any HogQLParser::WithExprSubqueryContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
    return parserVisitor->visitWithExprSubquery(this);
  else
    return visitor->visitChildren(this);
}
HogQLParser::WithExprContext* HogQLParser::withExpr() {
  WithExprContext *_localctx = _tracker.createInstance<WithExprContext>(_ctx, getState());
  enterRule(_localctx, 136, HogQLParser::RuleWithExpr);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    setState(1189);
    _errHandler->sync(this);
    switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 148, _ctx)) {
    case 1: {
      _localctx = _tracker.createInstance<HogQLParser::WithExprSubqueryContext>(_localctx);
      enterOuterAlt(_localctx, 1);
      setState(1179);
      identifier();
      setState(1180);
      match(HogQLParser::AS);
      setState(1181);
      match(HogQLParser::LPAREN);
      setState(1182);
      selectSetStmt();
      setState(1183);
      match(HogQLParser::RPAREN);
      break;
    }

    case 2: {
      _localctx = _tracker.createInstance<HogQLParser::WithExprColumnContext>(_localctx);
      enterOuterAlt(_localctx, 2);
      setState(1185);
      columnExpr(0);
      setState(1186);
      match(HogQLParser::AS);
      setState(1187);
      identifier();
      break;
    }

    default:
      break;
    }
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- ColumnIdentifierContext ------------------------------------------------------------------

HogQLParser::ColumnIdentifierContext::ColumnIdentifierContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

HogQLParser::PlaceholderContext* HogQLParser::ColumnIdentifierContext::placeholder() {
  return getRuleContext<HogQLParser::PlaceholderContext>(0);
}

HogQLParser::NestedIdentifierContext* HogQLParser::ColumnIdentifierContext::nestedIdentifier() {
  return getRuleContext<HogQLParser::NestedIdentifierContext>(0);
}

HogQLParser::TableIdentifierContext* HogQLParser::ColumnIdentifierContext::tableIdentifier() {
  return getRuleContext<HogQLParser::TableIdentifierContext>(0);
}

tree::TerminalNode* HogQLParser::ColumnIdentifierContext::DOT() {
  return getToken(HogQLParser::DOT, 0);
}


size_t HogQLParser::ColumnIdentifierContext::getRuleIndex() const {
  return HogQLParser::RuleColumnIdentifier;
}


std::any HogQLParser::ColumnIdentifierContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
    return parserVisitor->visitColumnIdentifier(this);
  else
    return visitor->visitChildren(this);
}

HogQLParser::ColumnIdentifierContext* HogQLParser::columnIdentifier() {
  ColumnIdentifierContext *_localctx = _tracker.createInstance<ColumnIdentifierContext>(_ctx, getState());
  enterRule(_localctx, 138, HogQLParser::RuleColumnIdentifier);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    setState(1198);
    _errHandler->sync(this);
    switch (_input->LA(1)) {
      case HogQLParser::LBRACE: {
        enterOuterAlt(_localctx, 1);
        setState(1191);
        placeholder();
        break;
      }

      case HogQLParser::ALL:
      case HogQLParser::AND:
      case HogQLParser::ANTI:
      case HogQLParser::ANY:
      case HogQLParser::ARRAY:
      case HogQLParser::AS:
      case HogQLParser::ASCENDING:
      case HogQLParser::ASOF:
      case HogQLParser::BETWEEN:
      case HogQLParser::BOTH:
      case HogQLParser::BY:
      case HogQLParser::CASE:
      case HogQLParser::CAST:
      case HogQLParser::COHORT:
      case HogQLParser::COLLATE:
      case HogQLParser::CROSS:
      case HogQLParser::CUBE:
      case HogQLParser::CURRENT:
      case HogQLParser::DATE:
      case HogQLParser::DAY:
      case HogQLParser::DESC:
      case HogQLParser::DESCENDING:
      case HogQLParser::DISTINCT:
      case HogQLParser::ELSE:
      case HogQLParser::END:
      case HogQLParser::EXTRACT:
      case HogQLParser::FINAL:
      case HogQLParser::FIRST:
      case HogQLParser::FOLLOWING:
      case HogQLParser::FOR:
      case HogQLParser::FROM:
      case HogQLParser::FULL:
      case HogQLParser::GROUP:
      case HogQLParser::HAVING:
      case HogQLParser::HOUR:
      case HogQLParser::ID:
      case HogQLParser::IF:
      case HogQLParser::ILIKE:
      case HogQLParser::IN:
      case HogQLParser::INNER:
      case HogQLParser::INTERVAL:
      case HogQLParser::IS:
      case HogQLParser::JOIN:
      case HogQLParser::KEY:
      case HogQLParser::LAST:
      case HogQLParser::LEADING:
      case HogQLParser::LEFT:
      case HogQLParser::LIKE:
      case HogQLParser::LIMIT:
      case HogQLParser::MINUTE:
      case HogQLParser::MONTH:
      case HogQLParser::NOT:
      case HogQLParser::NULLS:
      case HogQLParser::OFFSET:
      case HogQLParser::ON:
      case HogQLParser::OR:
      case HogQLParser::ORDER:
      case HogQLParser::OUTER:
      case HogQLParser::OVER:
      case HogQLParser::PARTITION:
      case HogQLParser::PRECEDING:
      case HogQLParser::PREWHERE:
      case HogQLParser::QUARTER:
      case HogQLParser::RANGE:
      case HogQLParser::RETURN:
      case HogQLParser::RIGHT:
      case HogQLParser::ROLLUP:
      case HogQLParser::ROW:
      case HogQLParser::ROWS:
      case HogQLParser::SAMPLE:
      case HogQLParser::SECOND:
      case HogQLParser::SELECT:
      case HogQLParser::SEMI:
      case HogQLParser::SETTINGS:
      case HogQLParser::SUBSTRING:
      case HogQLParser::THEN:
      case HogQLParser::TIES:
      case HogQLParser::TIMESTAMP:
      case HogQLParser::TO:
      case HogQLParser::TOP:
      case HogQLParser::TOTALS:
      case HogQLParser::TRAILING:
      case HogQLParser::TRIM:
      case HogQLParser::TRUNCATE:
      case HogQLParser::UNBOUNDED:
      case HogQLParser::UNION:
      case HogQLParser::USING:
      case HogQLParser::WEEK:
      case HogQLParser::WHEN:
      case HogQLParser::WHERE:
      case HogQLParser::WINDOW:
      case HogQLParser::WITH:
      case HogQLParser::YEAR:
      case HogQLParser::IDENTIFIER: {
        enterOuterAlt(_localctx, 2);
        setState(1195);
        _errHandler->sync(this);

        switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 149, _ctx)) {
        case 1: {
          setState(1192);
          tableIdentifier();
          setState(1193);
          match(HogQLParser::DOT);
          break;
        }

        default:
          break;
        }
        setState(1197);
        nestedIdentifier();
        break;
      }

    default:
      throw NoViableAltException(this);
    }
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- NestedIdentifierContext ------------------------------------------------------------------

HogQLParser::NestedIdentifierContext::NestedIdentifierContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

std::vector<HogQLParser::IdentifierContext *> HogQLParser::NestedIdentifierContext::identifier() {
  return getRuleContexts<HogQLParser::IdentifierContext>();
}

HogQLParser::IdentifierContext* HogQLParser::NestedIdentifierContext::identifier(size_t i) {
  return getRuleContext<HogQLParser::IdentifierContext>(i);
}

std::vector<tree::TerminalNode *> HogQLParser::NestedIdentifierContext::DOT() {
  return getTokens(HogQLParser::DOT);
}

tree::TerminalNode* HogQLParser::NestedIdentifierContext::DOT(size_t i) {
  return getToken(HogQLParser::DOT, i);
}


size_t HogQLParser::NestedIdentifierContext::getRuleIndex() const {
  return HogQLParser::RuleNestedIdentifier;
}


std::any HogQLParser::NestedIdentifierContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
    return parserVisitor->visitNestedIdentifier(this);
  else
    return visitor->visitChildren(this);
}

HogQLParser::NestedIdentifierContext* HogQLParser::nestedIdentifier() {
  NestedIdentifierContext *_localctx = _tracker.createInstance<NestedIdentifierContext>(_ctx, getState());
  enterRule(_localctx, 140, HogQLParser::RuleNestedIdentifier);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    size_t alt;
    enterOuterAlt(_localctx, 1);
    setState(1200);
    identifier();
    setState(1205);
    _errHandler->sync(this);
    alt = getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 151, _ctx);
    while (alt != 2 && alt != atn::ATN::INVALID_ALT_NUMBER) {
      if (alt == 1) {
        setState(1201);
        match(HogQLParser::DOT);
        setState(1202);
        identifier(); 
      }
      setState(1207);
      _errHandler->sync(this);
      alt = getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 151, _ctx);
    }
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- TableExprContext ------------------------------------------------------------------

HogQLParser::TableExprContext::TableExprContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}


size_t HogQLParser::TableExprContext::getRuleIndex() const {
  return HogQLParser::RuleTableExpr;
}

void HogQLParser::TableExprContext::copyFrom(TableExprContext *ctx) {
  ParserRuleContext::copyFrom(ctx);
}

//----------------- TableExprTagContext ------------------------------------------------------------------

HogQLParser::HogqlxTagElementContext* HogQLParser::TableExprTagContext::hogqlxTagElement() {
  return getRuleContext<HogQLParser::HogqlxTagElementContext>(0);
}

HogQLParser::TableExprTagContext::TableExprTagContext(TableExprContext *ctx) { copyFrom(ctx); }


std::any HogQLParser::TableExprTagContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
    return parserVisitor->visitTableExprTag(this);
  else
    return visitor->visitChildren(this);
}
//----------------- TableExprIdentifierContext ------------------------------------------------------------------

HogQLParser::TableIdentifierContext* HogQLParser::TableExprIdentifierContext::tableIdentifier() {
  return getRuleContext<HogQLParser::TableIdentifierContext>(0);
}

HogQLParser::TableExprIdentifierContext::TableExprIdentifierContext(TableExprContext *ctx) { copyFrom(ctx); }


std::any HogQLParser::TableExprIdentifierContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
    return parserVisitor->visitTableExprIdentifier(this);
  else
    return visitor->visitChildren(this);
}
//----------------- TableExprPlaceholderContext ------------------------------------------------------------------

HogQLParser::PlaceholderContext* HogQLParser::TableExprPlaceholderContext::placeholder() {
  return getRuleContext<HogQLParser::PlaceholderContext>(0);
}

HogQLParser::TableExprPlaceholderContext::TableExprPlaceholderContext(TableExprContext *ctx) { copyFrom(ctx); }


std::any HogQLParser::TableExprPlaceholderContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
    return parserVisitor->visitTableExprPlaceholder(this);
  else
    return visitor->visitChildren(this);
}
//----------------- TableExprSubqueryContext ------------------------------------------------------------------

tree::TerminalNode* HogQLParser::TableExprSubqueryContext::LPAREN() {
  return getToken(HogQLParser::LPAREN, 0);
}

HogQLParser::SelectSetStmtContext* HogQLParser::TableExprSubqueryContext::selectSetStmt() {
  return getRuleContext<HogQLParser::SelectSetStmtContext>(0);
}

tree::TerminalNode* HogQLParser::TableExprSubqueryContext::RPAREN() {
  return getToken(HogQLParser::RPAREN, 0);
}

HogQLParser::TableExprSubqueryContext::TableExprSubqueryContext(TableExprContext *ctx) { copyFrom(ctx); }


std::any HogQLParser::TableExprSubqueryContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
    return parserVisitor->visitTableExprSubquery(this);
  else
    return visitor->visitChildren(this);
}
//----------------- TableExprAliasContext ------------------------------------------------------------------

HogQLParser::TableExprContext* HogQLParser::TableExprAliasContext::tableExpr() {
  return getRuleContext<HogQLParser::TableExprContext>(0);
}

HogQLParser::AliasContext* HogQLParser::TableExprAliasContext::alias() {
  return getRuleContext<HogQLParser::AliasContext>(0);
}

tree::TerminalNode* HogQLParser::TableExprAliasContext::AS() {
  return getToken(HogQLParser::AS, 0);
}

HogQLParser::IdentifierContext* HogQLParser::TableExprAliasContext::identifier() {
  return getRuleContext<HogQLParser::IdentifierContext>(0);
}

HogQLParser::TableExprAliasContext::TableExprAliasContext(TableExprContext *ctx) { copyFrom(ctx); }


std::any HogQLParser::TableExprAliasContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
    return parserVisitor->visitTableExprAlias(this);
  else
    return visitor->visitChildren(this);
}
//----------------- TableExprFunctionContext ------------------------------------------------------------------

HogQLParser::TableFunctionExprContext* HogQLParser::TableExprFunctionContext::tableFunctionExpr() {
  return getRuleContext<HogQLParser::TableFunctionExprContext>(0);
}

HogQLParser::TableExprFunctionContext::TableExprFunctionContext(TableExprContext *ctx) { copyFrom(ctx); }


std::any HogQLParser::TableExprFunctionContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
    return parserVisitor->visitTableExprFunction(this);
  else
    return visitor->visitChildren(this);
}

HogQLParser::TableExprContext* HogQLParser::tableExpr() {
   return tableExpr(0);
}

HogQLParser::TableExprContext* HogQLParser::tableExpr(int precedence) {
  ParserRuleContext *parentContext = _ctx;
  size_t parentState = getState();
  HogQLParser::TableExprContext *_localctx = _tracker.createInstance<TableExprContext>(_ctx, parentState);
  HogQLParser::TableExprContext *previousContext = _localctx;
  (void)previousContext; // Silence compiler, in case the context is not used by generated code.
  size_t startState = 142;
  enterRecursionRule(_localctx, 142, HogQLParser::RuleTableExpr, precedence);

    

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    unrollRecursionContexts(parentContext);
  });
  try {
    size_t alt;
    enterOuterAlt(_localctx, 1);
    setState(1217);
    _errHandler->sync(this);
    switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 152, _ctx)) {
    case 1: {
      _localctx = _tracker.createInstance<TableExprIdentifierContext>(_localctx);
      _ctx = _localctx;
      previousContext = _localctx;

      setState(1209);
      tableIdentifier();
      break;
    }

    case 2: {
      _localctx = _tracker.createInstance<TableExprFunctionContext>(_localctx);
      _ctx = _localctx;
      previousContext = _localctx;
      setState(1210);
      tableFunctionExpr();
      break;
    }

    case 3: {
      _localctx = _tracker.createInstance<TableExprSubqueryContext>(_localctx);
      _ctx = _localctx;
      previousContext = _localctx;
      setState(1211);
      match(HogQLParser::LPAREN);
      setState(1212);
      selectSetStmt();
      setState(1213);
      match(HogQLParser::RPAREN);
      break;
    }

    case 4: {
      _localctx = _tracker.createInstance<TableExprTagContext>(_localctx);
      _ctx = _localctx;
      previousContext = _localctx;
      setState(1215);
      hogqlxTagElement();
      break;
    }

    case 5: {
      _localctx = _tracker.createInstance<TableExprPlaceholderContext>(_localctx);
      _ctx = _localctx;
      previousContext = _localctx;
      setState(1216);
      placeholder();
      break;
    }

    default:
      break;
    }
    _ctx->stop = _input->LT(-1);
    setState(1227);
    _errHandler->sync(this);
    alt = getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 154, _ctx);
    while (alt != 2 && alt != atn::ATN::INVALID_ALT_NUMBER) {
      if (alt == 1) {
        if (!_parseListeners.empty())
          triggerExitRuleEvent();
        previousContext = _localctx;
        auto newContext = _tracker.createInstance<TableExprAliasContext>(_tracker.createInstance<TableExprContext>(parentContext, parentState));
        _localctx = newContext;
        pushNewRecursionContext(newContext, startState, RuleTableExpr);
        setState(1219);

        if (!(precpred(_ctx, 3))) throw FailedPredicateException(this, "precpred(_ctx, 3)");
        setState(1223);
        _errHandler->sync(this);
        switch (_input->LA(1)) {
          case HogQLParser::DATE:
          case HogQLParser::FIRST:
          case HogQLParser::ID:
          case HogQLParser::KEY:
          case HogQLParser::IDENTIFIER: {
            setState(1220);
            alias();
            break;
          }

          case HogQLParser::AS: {
            setState(1221);
            match(HogQLParser::AS);
            setState(1222);
            identifier();
            break;
          }

        default:
          throw NoViableAltException(this);
        } 
      }
      setState(1229);
      _errHandler->sync(this);
      alt = getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 154, _ctx);
    }
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }
  return _localctx;
}

//----------------- TableFunctionExprContext ------------------------------------------------------------------

HogQLParser::TableFunctionExprContext::TableFunctionExprContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

HogQLParser::IdentifierContext* HogQLParser::TableFunctionExprContext::identifier() {
  return getRuleContext<HogQLParser::IdentifierContext>(0);
}

tree::TerminalNode* HogQLParser::TableFunctionExprContext::LPAREN() {
  return getToken(HogQLParser::LPAREN, 0);
}

tree::TerminalNode* HogQLParser::TableFunctionExprContext::RPAREN() {
  return getToken(HogQLParser::RPAREN, 0);
}

HogQLParser::TableArgListContext* HogQLParser::TableFunctionExprContext::tableArgList() {
  return getRuleContext<HogQLParser::TableArgListContext>(0);
}


size_t HogQLParser::TableFunctionExprContext::getRuleIndex() const {
  return HogQLParser::RuleTableFunctionExpr;
}


std::any HogQLParser::TableFunctionExprContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
    return parserVisitor->visitTableFunctionExpr(this);
  else
    return visitor->visitChildren(this);
}

HogQLParser::TableFunctionExprContext* HogQLParser::tableFunctionExpr() {
  TableFunctionExprContext *_localctx = _tracker.createInstance<TableFunctionExprContext>(_ctx, getState());
  enterRule(_localctx, 144, HogQLParser::RuleTableFunctionExpr);
  size_t _la = 0;

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(1230);
    identifier();
    setState(1231);
    match(HogQLParser::LPAREN);
    setState(1233);
    _errHandler->sync(this);

    _la = _input->LA(1);
    if ((((_la & ~ 0x3fULL) == 0) &&
      ((1ULL << _la) & -36169677449216002) != 0) || ((((_la - 64) & ~ 0x3fULL) == 0) &&
      ((1ULL << (_la - 64)) & 723944289947615231) != 0) || ((((_la - 131) & ~ 0x3fULL) == 0) &&
      ((1ULL << (_la - 131)) & 36887) != 0)) {
      setState(1232);
      tableArgList();
    }
    setState(1235);
    match(HogQLParser::RPAREN);
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- TableIdentifierContext ------------------------------------------------------------------

HogQLParser::TableIdentifierContext::TableIdentifierContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

HogQLParser::NestedIdentifierContext* HogQLParser::TableIdentifierContext::nestedIdentifier() {
  return getRuleContext<HogQLParser::NestedIdentifierContext>(0);
}

HogQLParser::DatabaseIdentifierContext* HogQLParser::TableIdentifierContext::databaseIdentifier() {
  return getRuleContext<HogQLParser::DatabaseIdentifierContext>(0);
}

tree::TerminalNode* HogQLParser::TableIdentifierContext::DOT() {
  return getToken(HogQLParser::DOT, 0);
}


size_t HogQLParser::TableIdentifierContext::getRuleIndex() const {
  return HogQLParser::RuleTableIdentifier;
}


std::any HogQLParser::TableIdentifierContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
    return parserVisitor->visitTableIdentifier(this);
  else
    return visitor->visitChildren(this);
}

HogQLParser::TableIdentifierContext* HogQLParser::tableIdentifier() {
  TableIdentifierContext *_localctx = _tracker.createInstance<TableIdentifierContext>(_ctx, getState());
  enterRule(_localctx, 146, HogQLParser::RuleTableIdentifier);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(1240);
    _errHandler->sync(this);

    switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 156, _ctx)) {
    case 1: {
      setState(1237);
      databaseIdentifier();
      setState(1238);
      match(HogQLParser::DOT);
      break;
    }

    default:
      break;
    }
    setState(1242);
    nestedIdentifier();
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- TableArgListContext ------------------------------------------------------------------

HogQLParser::TableArgListContext::TableArgListContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

std::vector<HogQLParser::ColumnExprContext *> HogQLParser::TableArgListContext::columnExpr() {
  return getRuleContexts<HogQLParser::ColumnExprContext>();
}

HogQLParser::ColumnExprContext* HogQLParser::TableArgListContext::columnExpr(size_t i) {
  return getRuleContext<HogQLParser::ColumnExprContext>(i);
}

std::vector<tree::TerminalNode *> HogQLParser::TableArgListContext::COMMA() {
  return getTokens(HogQLParser::COMMA);
}

tree::TerminalNode* HogQLParser::TableArgListContext::COMMA(size_t i) {
  return getToken(HogQLParser::COMMA, i);
}


size_t HogQLParser::TableArgListContext::getRuleIndex() const {
  return HogQLParser::RuleTableArgList;
}


std::any HogQLParser::TableArgListContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
    return parserVisitor->visitTableArgList(this);
  else
    return visitor->visitChildren(this);
}

HogQLParser::TableArgListContext* HogQLParser::tableArgList() {
  TableArgListContext *_localctx = _tracker.createInstance<TableArgListContext>(_ctx, getState());
  enterRule(_localctx, 148, HogQLParser::RuleTableArgList);
  size_t _la = 0;

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    size_t alt;
    enterOuterAlt(_localctx, 1);
    setState(1244);
    columnExpr(0);
    setState(1249);
    _errHandler->sync(this);
    alt = getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 157, _ctx);
    while (alt != 2 && alt != atn::ATN::INVALID_ALT_NUMBER) {
      if (alt == 1) {
        setState(1245);
        match(HogQLParser::COMMA);
        setState(1246);
        columnExpr(0); 
      }
      setState(1251);
      _errHandler->sync(this);
      alt = getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 157, _ctx);
    }
    setState(1253);
    _errHandler->sync(this);

    _la = _input->LA(1);
    if (_la == HogQLParser::COMMA) {
      setState(1252);
      match(HogQLParser::COMMA);
    }
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- DatabaseIdentifierContext ------------------------------------------------------------------

HogQLParser::DatabaseIdentifierContext::DatabaseIdentifierContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

HogQLParser::IdentifierContext* HogQLParser::DatabaseIdentifierContext::identifier() {
  return getRuleContext<HogQLParser::IdentifierContext>(0);
}


size_t HogQLParser::DatabaseIdentifierContext::getRuleIndex() const {
  return HogQLParser::RuleDatabaseIdentifier;
}


std::any HogQLParser::DatabaseIdentifierContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
    return parserVisitor->visitDatabaseIdentifier(this);
  else
    return visitor->visitChildren(this);
}

HogQLParser::DatabaseIdentifierContext* HogQLParser::databaseIdentifier() {
  DatabaseIdentifierContext *_localctx = _tracker.createInstance<DatabaseIdentifierContext>(_ctx, getState());
  enterRule(_localctx, 150, HogQLParser::RuleDatabaseIdentifier);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(1255);
    identifier();
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- FloatingLiteralContext ------------------------------------------------------------------

HogQLParser::FloatingLiteralContext::FloatingLiteralContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

tree::TerminalNode* HogQLParser::FloatingLiteralContext::FLOATING_LITERAL() {
  return getToken(HogQLParser::FLOATING_LITERAL, 0);
}

tree::TerminalNode* HogQLParser::FloatingLiteralContext::DOT() {
  return getToken(HogQLParser::DOT, 0);
}

std::vector<tree::TerminalNode *> HogQLParser::FloatingLiteralContext::DECIMAL_LITERAL() {
  return getTokens(HogQLParser::DECIMAL_LITERAL);
}

tree::TerminalNode* HogQLParser::FloatingLiteralContext::DECIMAL_LITERAL(size_t i) {
  return getToken(HogQLParser::DECIMAL_LITERAL, i);
}

tree::TerminalNode* HogQLParser::FloatingLiteralContext::OCTAL_LITERAL() {
  return getToken(HogQLParser::OCTAL_LITERAL, 0);
}


size_t HogQLParser::FloatingLiteralContext::getRuleIndex() const {
  return HogQLParser::RuleFloatingLiteral;
}


std::any HogQLParser::FloatingLiteralContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
    return parserVisitor->visitFloatingLiteral(this);
  else
    return visitor->visitChildren(this);
}

HogQLParser::FloatingLiteralContext* HogQLParser::floatingLiteral() {
  FloatingLiteralContext *_localctx = _tracker.createInstance<FloatingLiteralContext>(_ctx, getState());
  enterRule(_localctx, 152, HogQLParser::RuleFloatingLiteral);
  size_t _la = 0;

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    setState(1265);
    _errHandler->sync(this);
    switch (_input->LA(1)) {
      case HogQLParser::FLOATING_LITERAL: {
        enterOuterAlt(_localctx, 1);
        setState(1257);
        match(HogQLParser::FLOATING_LITERAL);
        break;
      }

      case HogQLParser::DOT: {
        enterOuterAlt(_localctx, 2);
        setState(1258);
        match(HogQLParser::DOT);
        setState(1259);
        _la = _input->LA(1);
        if (!(_la == HogQLParser::OCTAL_LITERAL

        || _la == HogQLParser::DECIMAL_LITERAL)) {
        _errHandler->recoverInline(this);
        }
        else {
          _errHandler->reportMatch(this);
          consume();
        }
        break;
      }

      case HogQLParser::DECIMAL_LITERAL: {
        enterOuterAlt(_localctx, 3);
        setState(1260);
        match(HogQLParser::DECIMAL_LITERAL);
        setState(1261);
        match(HogQLParser::DOT);
        setState(1263);
        _errHandler->sync(this);

        switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 159, _ctx)) {
        case 1: {
          setState(1262);
          _la = _input->LA(1);
          if (!(_la == HogQLParser::OCTAL_LITERAL

          || _la == HogQLParser::DECIMAL_LITERAL)) {
          _errHandler->recoverInline(this);
          }
          else {
            _errHandler->reportMatch(this);
            consume();
          }
          break;
        }

        default:
          break;
        }
        break;
      }

    default:
      throw NoViableAltException(this);
    }
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- NumberLiteralContext ------------------------------------------------------------------

HogQLParser::NumberLiteralContext::NumberLiteralContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

HogQLParser::FloatingLiteralContext* HogQLParser::NumberLiteralContext::floatingLiteral() {
  return getRuleContext<HogQLParser::FloatingLiteralContext>(0);
}

tree::TerminalNode* HogQLParser::NumberLiteralContext::OCTAL_LITERAL() {
  return getToken(HogQLParser::OCTAL_LITERAL, 0);
}

tree::TerminalNode* HogQLParser::NumberLiteralContext::DECIMAL_LITERAL() {
  return getToken(HogQLParser::DECIMAL_LITERAL, 0);
}

tree::TerminalNode* HogQLParser::NumberLiteralContext::HEXADECIMAL_LITERAL() {
  return getToken(HogQLParser::HEXADECIMAL_LITERAL, 0);
}

tree::TerminalNode* HogQLParser::NumberLiteralContext::INF() {
  return getToken(HogQLParser::INF, 0);
}

tree::TerminalNode* HogQLParser::NumberLiteralContext::NAN_SQL() {
  return getToken(HogQLParser::NAN_SQL, 0);
}

tree::TerminalNode* HogQLParser::NumberLiteralContext::PLUS() {
  return getToken(HogQLParser::PLUS, 0);
}

tree::TerminalNode* HogQLParser::NumberLiteralContext::DASH() {
  return getToken(HogQLParser::DASH, 0);
}


size_t HogQLParser::NumberLiteralContext::getRuleIndex() const {
  return HogQLParser::RuleNumberLiteral;
}


std::any HogQLParser::NumberLiteralContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
    return parserVisitor->visitNumberLiteral(this);
  else
    return visitor->visitChildren(this);
}

HogQLParser::NumberLiteralContext* HogQLParser::numberLiteral() {
  NumberLiteralContext *_localctx = _tracker.createInstance<NumberLiteralContext>(_ctx, getState());
  enterRule(_localctx, 154, HogQLParser::RuleNumberLiteral);
  size_t _la = 0;

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(1268);
    _errHandler->sync(this);

    _la = _input->LA(1);
    if (_la == HogQLParser::DASH

    || _la == HogQLParser::PLUS) {
      setState(1267);
      _la = _input->LA(1);
      if (!(_la == HogQLParser::DASH

      || _la == HogQLParser::PLUS)) {
      _errHandler->recoverInline(this);
      }
      else {
        _errHandler->reportMatch(this);
        consume();
      }
    }
    setState(1276);
    _errHandler->sync(this);
    switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 162, _ctx)) {
    case 1: {
      setState(1270);
      floatingLiteral();
      break;
    }

    case 2: {
      setState(1271);
      match(HogQLParser::OCTAL_LITERAL);
      break;
    }

    case 3: {
      setState(1272);
      match(HogQLParser::DECIMAL_LITERAL);
      break;
    }

    case 4: {
      setState(1273);
      match(HogQLParser::HEXADECIMAL_LITERAL);
      break;
    }

    case 5: {
      setState(1274);
      match(HogQLParser::INF);
      break;
    }

    case 6: {
      setState(1275);
      match(HogQLParser::NAN_SQL);
      break;
    }

    default:
      break;
    }
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- LiteralContext ------------------------------------------------------------------

HogQLParser::LiteralContext::LiteralContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

HogQLParser::NumberLiteralContext* HogQLParser::LiteralContext::numberLiteral() {
  return getRuleContext<HogQLParser::NumberLiteralContext>(0);
}

tree::TerminalNode* HogQLParser::LiteralContext::STRING_LITERAL() {
  return getToken(HogQLParser::STRING_LITERAL, 0);
}

tree::TerminalNode* HogQLParser::LiteralContext::NULL_SQL() {
  return getToken(HogQLParser::NULL_SQL, 0);
}


size_t HogQLParser::LiteralContext::getRuleIndex() const {
  return HogQLParser::RuleLiteral;
}


std::any HogQLParser::LiteralContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
    return parserVisitor->visitLiteral(this);
  else
    return visitor->visitChildren(this);
}

HogQLParser::LiteralContext* HogQLParser::literal() {
  LiteralContext *_localctx = _tracker.createInstance<LiteralContext>(_ctx, getState());
  enterRule(_localctx, 156, HogQLParser::RuleLiteral);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    setState(1281);
    _errHandler->sync(this);
    switch (_input->LA(1)) {
      case HogQLParser::INF:
      case HogQLParser::NAN_SQL:
      case HogQLParser::FLOATING_LITERAL:
      case HogQLParser::OCTAL_LITERAL:
      case HogQLParser::DECIMAL_LITERAL:
      case HogQLParser::HEXADECIMAL_LITERAL:
      case HogQLParser::DASH:
      case HogQLParser::DOT:
      case HogQLParser::PLUS: {
        enterOuterAlt(_localctx, 1);
        setState(1278);
        numberLiteral();
        break;
      }

      case HogQLParser::STRING_LITERAL: {
        enterOuterAlt(_localctx, 2);
        setState(1279);
        match(HogQLParser::STRING_LITERAL);
        break;
      }

      case HogQLParser::NULL_SQL: {
        enterOuterAlt(_localctx, 3);
        setState(1280);
        match(HogQLParser::NULL_SQL);
        break;
      }

    default:
      throw NoViableAltException(this);
    }
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- IntervalContext ------------------------------------------------------------------

HogQLParser::IntervalContext::IntervalContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

tree::TerminalNode* HogQLParser::IntervalContext::SECOND() {
  return getToken(HogQLParser::SECOND, 0);
}

tree::TerminalNode* HogQLParser::IntervalContext::MINUTE() {
  return getToken(HogQLParser::MINUTE, 0);
}

tree::TerminalNode* HogQLParser::IntervalContext::HOUR() {
  return getToken(HogQLParser::HOUR, 0);
}

tree::TerminalNode* HogQLParser::IntervalContext::DAY() {
  return getToken(HogQLParser::DAY, 0);
}

tree::TerminalNode* HogQLParser::IntervalContext::WEEK() {
  return getToken(HogQLParser::WEEK, 0);
}

tree::TerminalNode* HogQLParser::IntervalContext::MONTH() {
  return getToken(HogQLParser::MONTH, 0);
}

tree::TerminalNode* HogQLParser::IntervalContext::QUARTER() {
  return getToken(HogQLParser::QUARTER, 0);
}

tree::TerminalNode* HogQLParser::IntervalContext::YEAR() {
  return getToken(HogQLParser::YEAR, 0);
}


size_t HogQLParser::IntervalContext::getRuleIndex() const {
  return HogQLParser::RuleInterval;
}


std::any HogQLParser::IntervalContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
    return parserVisitor->visitInterval(this);
  else
    return visitor->visitChildren(this);
}

HogQLParser::IntervalContext* HogQLParser::interval() {
  IntervalContext *_localctx = _tracker.createInstance<IntervalContext>(_ctx, getState());
  enterRule(_localctx, 158, HogQLParser::RuleInterval);
  size_t _la = 0;

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(1283);
    _la = _input->LA(1);
    if (!((((_la & ~ 0x3fULL) == 0) &&
      ((1ULL << _la) & 864692227968860160) != 0) || ((((_la - 73) & ~ 0x3fULL) == 0) &&
      ((1ULL << (_la - 73)) & 8724152577) != 0))) {
    _errHandler->recoverInline(this);
    }
    else {
      _errHandler->reportMatch(this);
      consume();
    }
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- KeywordContext ------------------------------------------------------------------

HogQLParser::KeywordContext::KeywordContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

tree::TerminalNode* HogQLParser::KeywordContext::ALL() {
  return getToken(HogQLParser::ALL, 0);
}

tree::TerminalNode* HogQLParser::KeywordContext::AND() {
  return getToken(HogQLParser::AND, 0);
}

tree::TerminalNode* HogQLParser::KeywordContext::ANTI() {
  return getToken(HogQLParser::ANTI, 0);
}

tree::TerminalNode* HogQLParser::KeywordContext::ANY() {
  return getToken(HogQLParser::ANY, 0);
}

tree::TerminalNode* HogQLParser::KeywordContext::ARRAY() {
  return getToken(HogQLParser::ARRAY, 0);
}

tree::TerminalNode* HogQLParser::KeywordContext::AS() {
  return getToken(HogQLParser::AS, 0);
}

tree::TerminalNode* HogQLParser::KeywordContext::ASCENDING() {
  return getToken(HogQLParser::ASCENDING, 0);
}

tree::TerminalNode* HogQLParser::KeywordContext::ASOF() {
  return getToken(HogQLParser::ASOF, 0);
}

tree::TerminalNode* HogQLParser::KeywordContext::BETWEEN() {
  return getToken(HogQLParser::BETWEEN, 0);
}

tree::TerminalNode* HogQLParser::KeywordContext::BOTH() {
  return getToken(HogQLParser::BOTH, 0);
}

tree::TerminalNode* HogQLParser::KeywordContext::BY() {
  return getToken(HogQLParser::BY, 0);
}

tree::TerminalNode* HogQLParser::KeywordContext::CASE() {
  return getToken(HogQLParser::CASE, 0);
}

tree::TerminalNode* HogQLParser::KeywordContext::CAST() {
  return getToken(HogQLParser::CAST, 0);
}

tree::TerminalNode* HogQLParser::KeywordContext::COHORT() {
  return getToken(HogQLParser::COHORT, 0);
}

tree::TerminalNode* HogQLParser::KeywordContext::COLLATE() {
  return getToken(HogQLParser::COLLATE, 0);
}

tree::TerminalNode* HogQLParser::KeywordContext::CROSS() {
  return getToken(HogQLParser::CROSS, 0);
}

tree::TerminalNode* HogQLParser::KeywordContext::CUBE() {
  return getToken(HogQLParser::CUBE, 0);
}

tree::TerminalNode* HogQLParser::KeywordContext::CURRENT() {
  return getToken(HogQLParser::CURRENT, 0);
}

tree::TerminalNode* HogQLParser::KeywordContext::DATE() {
  return getToken(HogQLParser::DATE, 0);
}

tree::TerminalNode* HogQLParser::KeywordContext::DESC() {
  return getToken(HogQLParser::DESC, 0);
}

tree::TerminalNode* HogQLParser::KeywordContext::DESCENDING() {
  return getToken(HogQLParser::DESCENDING, 0);
}

tree::TerminalNode* HogQLParser::KeywordContext::DISTINCT() {
  return getToken(HogQLParser::DISTINCT, 0);
}

tree::TerminalNode* HogQLParser::KeywordContext::ELSE() {
  return getToken(HogQLParser::ELSE, 0);
}

tree::TerminalNode* HogQLParser::KeywordContext::END() {
  return getToken(HogQLParser::END, 0);
}

tree::TerminalNode* HogQLParser::KeywordContext::EXTRACT() {
  return getToken(HogQLParser::EXTRACT, 0);
}

tree::TerminalNode* HogQLParser::KeywordContext::FINAL() {
  return getToken(HogQLParser::FINAL, 0);
}

tree::TerminalNode* HogQLParser::KeywordContext::FIRST() {
  return getToken(HogQLParser::FIRST, 0);
}

tree::TerminalNode* HogQLParser::KeywordContext::FOR() {
  return getToken(HogQLParser::FOR, 0);
}

tree::TerminalNode* HogQLParser::KeywordContext::FOLLOWING() {
  return getToken(HogQLParser::FOLLOWING, 0);
}

tree::TerminalNode* HogQLParser::KeywordContext::FROM() {
  return getToken(HogQLParser::FROM, 0);
}

tree::TerminalNode* HogQLParser::KeywordContext::FULL() {
  return getToken(HogQLParser::FULL, 0);
}

tree::TerminalNode* HogQLParser::KeywordContext::GROUP() {
  return getToken(HogQLParser::GROUP, 0);
}

tree::TerminalNode* HogQLParser::KeywordContext::HAVING() {
  return getToken(HogQLParser::HAVING, 0);
}

tree::TerminalNode* HogQLParser::KeywordContext::ID() {
  return getToken(HogQLParser::ID, 0);
}

tree::TerminalNode* HogQLParser::KeywordContext::IS() {
  return getToken(HogQLParser::IS, 0);
}

tree::TerminalNode* HogQLParser::KeywordContext::IF() {
  return getToken(HogQLParser::IF, 0);
}

tree::TerminalNode* HogQLParser::KeywordContext::ILIKE() {
  return getToken(HogQLParser::ILIKE, 0);
}

tree::TerminalNode* HogQLParser::KeywordContext::IN() {
  return getToken(HogQLParser::IN, 0);
}

tree::TerminalNode* HogQLParser::KeywordContext::INNER() {
  return getToken(HogQLParser::INNER, 0);
}

tree::TerminalNode* HogQLParser::KeywordContext::INTERVAL() {
  return getToken(HogQLParser::INTERVAL, 0);
}

tree::TerminalNode* HogQLParser::KeywordContext::JOIN() {
  return getToken(HogQLParser::JOIN, 0);
}

tree::TerminalNode* HogQLParser::KeywordContext::KEY() {
  return getToken(HogQLParser::KEY, 0);
}

tree::TerminalNode* HogQLParser::KeywordContext::LAST() {
  return getToken(HogQLParser::LAST, 0);
}

tree::TerminalNode* HogQLParser::KeywordContext::LEADING() {
  return getToken(HogQLParser::LEADING, 0);
}

tree::TerminalNode* HogQLParser::KeywordContext::LEFT() {
  return getToken(HogQLParser::LEFT, 0);
}

tree::TerminalNode* HogQLParser::KeywordContext::LIKE() {
  return getToken(HogQLParser::LIKE, 0);
}

tree::TerminalNode* HogQLParser::KeywordContext::LIMIT() {
  return getToken(HogQLParser::LIMIT, 0);
}

tree::TerminalNode* HogQLParser::KeywordContext::NOT() {
  return getToken(HogQLParser::NOT, 0);
}

tree::TerminalNode* HogQLParser::KeywordContext::NULLS() {
  return getToken(HogQLParser::NULLS, 0);
}

tree::TerminalNode* HogQLParser::KeywordContext::OFFSET() {
  return getToken(HogQLParser::OFFSET, 0);
}

tree::TerminalNode* HogQLParser::KeywordContext::ON() {
  return getToken(HogQLParser::ON, 0);
}

tree::TerminalNode* HogQLParser::KeywordContext::OR() {
  return getToken(HogQLParser::OR, 0);
}

tree::TerminalNode* HogQLParser::KeywordContext::ORDER() {
  return getToken(HogQLParser::ORDER, 0);
}

tree::TerminalNode* HogQLParser::KeywordContext::OUTER() {
  return getToken(HogQLParser::OUTER, 0);
}

tree::TerminalNode* HogQLParser::KeywordContext::OVER() {
  return getToken(HogQLParser::OVER, 0);
}

tree::TerminalNode* HogQLParser::KeywordContext::PARTITION() {
  return getToken(HogQLParser::PARTITION, 0);
}

tree::TerminalNode* HogQLParser::KeywordContext::PRECEDING() {
  return getToken(HogQLParser::PRECEDING, 0);
}

tree::TerminalNode* HogQLParser::KeywordContext::PREWHERE() {
  return getToken(HogQLParser::PREWHERE, 0);
}

tree::TerminalNode* HogQLParser::KeywordContext::RANGE() {
  return getToken(HogQLParser::RANGE, 0);
}

tree::TerminalNode* HogQLParser::KeywordContext::RETURN() {
  return getToken(HogQLParser::RETURN, 0);
}

tree::TerminalNode* HogQLParser::KeywordContext::RIGHT() {
  return getToken(HogQLParser::RIGHT, 0);
}

tree::TerminalNode* HogQLParser::KeywordContext::ROLLUP() {
  return getToken(HogQLParser::ROLLUP, 0);
}

tree::TerminalNode* HogQLParser::KeywordContext::ROW() {
  return getToken(HogQLParser::ROW, 0);
}

tree::TerminalNode* HogQLParser::KeywordContext::ROWS() {
  return getToken(HogQLParser::ROWS, 0);
}

tree::TerminalNode* HogQLParser::KeywordContext::SAMPLE() {
  return getToken(HogQLParser::SAMPLE, 0);
}

tree::TerminalNode* HogQLParser::KeywordContext::SELECT() {
  return getToken(HogQLParser::SELECT, 0);
}

tree::TerminalNode* HogQLParser::KeywordContext::SEMI() {
  return getToken(HogQLParser::SEMI, 0);
}

tree::TerminalNode* HogQLParser::KeywordContext::SETTINGS() {
  return getToken(HogQLParser::SETTINGS, 0);
}

tree::TerminalNode* HogQLParser::KeywordContext::SUBSTRING() {
  return getToken(HogQLParser::SUBSTRING, 0);
}

tree::TerminalNode* HogQLParser::KeywordContext::THEN() {
  return getToken(HogQLParser::THEN, 0);
}

tree::TerminalNode* HogQLParser::KeywordContext::TIES() {
  return getToken(HogQLParser::TIES, 0);
}

tree::TerminalNode* HogQLParser::KeywordContext::TIMESTAMP() {
  return getToken(HogQLParser::TIMESTAMP, 0);
}

tree::TerminalNode* HogQLParser::KeywordContext::TOTALS() {
  return getToken(HogQLParser::TOTALS, 0);
}

tree::TerminalNode* HogQLParser::KeywordContext::TRAILING() {
  return getToken(HogQLParser::TRAILING, 0);
}

tree::TerminalNode* HogQLParser::KeywordContext::TRIM() {
  return getToken(HogQLParser::TRIM, 0);
}

tree::TerminalNode* HogQLParser::KeywordContext::TRUNCATE() {
  return getToken(HogQLParser::TRUNCATE, 0);
}

tree::TerminalNode* HogQLParser::KeywordContext::TO() {
  return getToken(HogQLParser::TO, 0);
}

tree::TerminalNode* HogQLParser::KeywordContext::TOP() {
  return getToken(HogQLParser::TOP, 0);
}

tree::TerminalNode* HogQLParser::KeywordContext::UNBOUNDED() {
  return getToken(HogQLParser::UNBOUNDED, 0);
}

tree::TerminalNode* HogQLParser::KeywordContext::UNION() {
  return getToken(HogQLParser::UNION, 0);
}

tree::TerminalNode* HogQLParser::KeywordContext::USING() {
  return getToken(HogQLParser::USING, 0);
}

tree::TerminalNode* HogQLParser::KeywordContext::WHEN() {
  return getToken(HogQLParser::WHEN, 0);
}

tree::TerminalNode* HogQLParser::KeywordContext::WHERE() {
  return getToken(HogQLParser::WHERE, 0);
}

tree::TerminalNode* HogQLParser::KeywordContext::WINDOW() {
  return getToken(HogQLParser::WINDOW, 0);
}

tree::TerminalNode* HogQLParser::KeywordContext::WITH() {
  return getToken(HogQLParser::WITH, 0);
}


size_t HogQLParser::KeywordContext::getRuleIndex() const {
  return HogQLParser::RuleKeyword;
}


std::any HogQLParser::KeywordContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
    return parserVisitor->visitKeyword(this);
  else
    return visitor->visitChildren(this);
}

HogQLParser::KeywordContext* HogQLParser::keyword() {
  KeywordContext *_localctx = _tracker.createInstance<KeywordContext>(_ctx, getState());
  enterRule(_localctx, 160, HogQLParser::RuleKeyword);
  size_t _la = 0;

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(1285);
    _la = _input->LA(1);
    if (!((((_la & ~ 0x3fULL) == 0) &&
      ((1ULL << _la) & -6665504612824399874) != 0) || ((((_la - 64) & ~ 0x3fULL) == 0) &&
      ((1ULL << (_la - 64)) & 3775267732991) != 0))) {
    _errHandler->recoverInline(this);
    }
    else {
      _errHandler->reportMatch(this);
      consume();
    }
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- KeywordForAliasContext ------------------------------------------------------------------

HogQLParser::KeywordForAliasContext::KeywordForAliasContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

tree::TerminalNode* HogQLParser::KeywordForAliasContext::DATE() {
  return getToken(HogQLParser::DATE, 0);
}

tree::TerminalNode* HogQLParser::KeywordForAliasContext::FIRST() {
  return getToken(HogQLParser::FIRST, 0);
}

tree::TerminalNode* HogQLParser::KeywordForAliasContext::ID() {
  return getToken(HogQLParser::ID, 0);
}

tree::TerminalNode* HogQLParser::KeywordForAliasContext::KEY() {
  return getToken(HogQLParser::KEY, 0);
}


size_t HogQLParser::KeywordForAliasContext::getRuleIndex() const {
  return HogQLParser::RuleKeywordForAlias;
}


std::any HogQLParser::KeywordForAliasContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
    return parserVisitor->visitKeywordForAlias(this);
  else
    return visitor->visitChildren(this);
}

HogQLParser::KeywordForAliasContext* HogQLParser::keywordForAlias() {
  KeywordForAliasContext *_localctx = _tracker.createInstance<KeywordForAliasContext>(_ctx, getState());
  enterRule(_localctx, 162, HogQLParser::RuleKeywordForAlias);
  size_t _la = 0;

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(1287);
    _la = _input->LA(1);
    if (!((((_la & ~ 0x3fULL) == 0) &&
      ((1ULL << _la) & 2254000985473024) != 0))) {
    _errHandler->recoverInline(this);
    }
    else {
      _errHandler->reportMatch(this);
      consume();
    }
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- AliasContext ------------------------------------------------------------------

HogQLParser::AliasContext::AliasContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

tree::TerminalNode* HogQLParser::AliasContext::IDENTIFIER() {
  return getToken(HogQLParser::IDENTIFIER, 0);
}

HogQLParser::KeywordForAliasContext* HogQLParser::AliasContext::keywordForAlias() {
  return getRuleContext<HogQLParser::KeywordForAliasContext>(0);
}


size_t HogQLParser::AliasContext::getRuleIndex() const {
  return HogQLParser::RuleAlias;
}


std::any HogQLParser::AliasContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
    return parserVisitor->visitAlias(this);
  else
    return visitor->visitChildren(this);
}

HogQLParser::AliasContext* HogQLParser::alias() {
  AliasContext *_localctx = _tracker.createInstance<AliasContext>(_ctx, getState());
  enterRule(_localctx, 164, HogQLParser::RuleAlias);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    setState(1291);
    _errHandler->sync(this);
    switch (_input->LA(1)) {
      case HogQLParser::IDENTIFIER: {
        enterOuterAlt(_localctx, 1);
        setState(1289);
        match(HogQLParser::IDENTIFIER);
        break;
      }

      case HogQLParser::DATE:
      case HogQLParser::FIRST:
      case HogQLParser::ID:
      case HogQLParser::KEY: {
        enterOuterAlt(_localctx, 2);
        setState(1290);
        keywordForAlias();
        break;
      }

    default:
      throw NoViableAltException(this);
    }
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- IdentifierContext ------------------------------------------------------------------

HogQLParser::IdentifierContext::IdentifierContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

tree::TerminalNode* HogQLParser::IdentifierContext::IDENTIFIER() {
  return getToken(HogQLParser::IDENTIFIER, 0);
}

HogQLParser::IntervalContext* HogQLParser::IdentifierContext::interval() {
  return getRuleContext<HogQLParser::IntervalContext>(0);
}

HogQLParser::KeywordContext* HogQLParser::IdentifierContext::keyword() {
  return getRuleContext<HogQLParser::KeywordContext>(0);
}


size_t HogQLParser::IdentifierContext::getRuleIndex() const {
  return HogQLParser::RuleIdentifier;
}


std::any HogQLParser::IdentifierContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
    return parserVisitor->visitIdentifier(this);
  else
    return visitor->visitChildren(this);
}

HogQLParser::IdentifierContext* HogQLParser::identifier() {
  IdentifierContext *_localctx = _tracker.createInstance<IdentifierContext>(_ctx, getState());
  enterRule(_localctx, 166, HogQLParser::RuleIdentifier);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    setState(1296);
    _errHandler->sync(this);
    switch (_input->LA(1)) {
      case HogQLParser::IDENTIFIER: {
        enterOuterAlt(_localctx, 1);
        setState(1293);
        match(HogQLParser::IDENTIFIER);
        break;
      }

      case HogQLParser::DAY:
      case HogQLParser::HOUR:
      case HogQLParser::MINUTE:
      case HogQLParser::MONTH:
      case HogQLParser::QUARTER:
      case HogQLParser::SECOND:
      case HogQLParser::WEEK:
      case HogQLParser::YEAR: {
        enterOuterAlt(_localctx, 2);
        setState(1294);
        interval();
        break;
      }

      case HogQLParser::ALL:
      case HogQLParser::AND:
      case HogQLParser::ANTI:
      case HogQLParser::ANY:
      case HogQLParser::ARRAY:
      case HogQLParser::AS:
      case HogQLParser::ASCENDING:
      case HogQLParser::ASOF:
      case HogQLParser::BETWEEN:
      case HogQLParser::BOTH:
      case HogQLParser::BY:
      case HogQLParser::CASE:
      case HogQLParser::CAST:
      case HogQLParser::COHORT:
      case HogQLParser::COLLATE:
      case HogQLParser::CROSS:
      case HogQLParser::CUBE:
      case HogQLParser::CURRENT:
      case HogQLParser::DATE:
      case HogQLParser::DESC:
      case HogQLParser::DESCENDING:
      case HogQLParser::DISTINCT:
      case HogQLParser::ELSE:
      case HogQLParser::END:
      case HogQLParser::EXTRACT:
      case HogQLParser::FINAL:
      case HogQLParser::FIRST:
      case HogQLParser::FOLLOWING:
      case HogQLParser::FOR:
      case HogQLParser::FROM:
      case HogQLParser::FULL:
      case HogQLParser::GROUP:
      case HogQLParser::HAVING:
      case HogQLParser::ID:
      case HogQLParser::IF:
      case HogQLParser::ILIKE:
      case HogQLParser::IN:
      case HogQLParser::INNER:
      case HogQLParser::INTERVAL:
      case HogQLParser::IS:
      case HogQLParser::JOIN:
      case HogQLParser::KEY:
      case HogQLParser::LAST:
      case HogQLParser::LEADING:
      case HogQLParser::LEFT:
      case HogQLParser::LIKE:
      case HogQLParser::LIMIT:
      case HogQLParser::NOT:
      case HogQLParser::NULLS:
      case HogQLParser::OFFSET:
      case HogQLParser::ON:
      case HogQLParser::OR:
      case HogQLParser::ORDER:
      case HogQLParser::OUTER:
      case HogQLParser::OVER:
      case HogQLParser::PARTITION:
      case HogQLParser::PRECEDING:
      case HogQLParser::PREWHERE:
      case HogQLParser::RANGE:
      case HogQLParser::RETURN:
      case HogQLParser::RIGHT:
      case HogQLParser::ROLLUP:
      case HogQLParser::ROW:
      case HogQLParser::ROWS:
      case HogQLParser::SAMPLE:
      case HogQLParser::SELECT:
      case HogQLParser::SEMI:
      case HogQLParser::SETTINGS:
      case HogQLParser::SUBSTRING:
      case HogQLParser::THEN:
      case HogQLParser::TIES:
      case HogQLParser::TIMESTAMP:
      case HogQLParser::TO:
      case HogQLParser::TOP:
      case HogQLParser::TOTALS:
      case HogQLParser::TRAILING:
      case HogQLParser::TRIM:
      case HogQLParser::TRUNCATE:
      case HogQLParser::UNBOUNDED:
      case HogQLParser::UNION:
      case HogQLParser::USING:
      case HogQLParser::WHEN:
      case HogQLParser::WHERE:
      case HogQLParser::WINDOW:
      case HogQLParser::WITH: {
        enterOuterAlt(_localctx, 3);
        setState(1295);
        keyword();
        break;
      }

    default:
      throw NoViableAltException(this);
    }
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- EnumValueContext ------------------------------------------------------------------

HogQLParser::EnumValueContext::EnumValueContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

HogQLParser::StringContext* HogQLParser::EnumValueContext::string() {
  return getRuleContext<HogQLParser::StringContext>(0);
}

tree::TerminalNode* HogQLParser::EnumValueContext::EQ_SINGLE() {
  return getToken(HogQLParser::EQ_SINGLE, 0);
}

HogQLParser::NumberLiteralContext* HogQLParser::EnumValueContext::numberLiteral() {
  return getRuleContext<HogQLParser::NumberLiteralContext>(0);
}


size_t HogQLParser::EnumValueContext::getRuleIndex() const {
  return HogQLParser::RuleEnumValue;
}


std::any HogQLParser::EnumValueContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
    return parserVisitor->visitEnumValue(this);
  else
    return visitor->visitChildren(this);
}

HogQLParser::EnumValueContext* HogQLParser::enumValue() {
  EnumValueContext *_localctx = _tracker.createInstance<EnumValueContext>(_ctx, getState());
  enterRule(_localctx, 168, HogQLParser::RuleEnumValue);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(1298);
    string();
    setState(1299);
    match(HogQLParser::EQ_SINGLE);
    setState(1300);
    numberLiteral();
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- PlaceholderContext ------------------------------------------------------------------

HogQLParser::PlaceholderContext::PlaceholderContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

tree::TerminalNode* HogQLParser::PlaceholderContext::LBRACE() {
  return getToken(HogQLParser::LBRACE, 0);
}

HogQLParser::ColumnExprContext* HogQLParser::PlaceholderContext::columnExpr() {
  return getRuleContext<HogQLParser::ColumnExprContext>(0);
}

tree::TerminalNode* HogQLParser::PlaceholderContext::RBRACE() {
  return getToken(HogQLParser::RBRACE, 0);
}


size_t HogQLParser::PlaceholderContext::getRuleIndex() const {
  return HogQLParser::RulePlaceholder;
}


std::any HogQLParser::PlaceholderContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
    return parserVisitor->visitPlaceholder(this);
  else
    return visitor->visitChildren(this);
}

HogQLParser::PlaceholderContext* HogQLParser::placeholder() {
  PlaceholderContext *_localctx = _tracker.createInstance<PlaceholderContext>(_ctx, getState());
  enterRule(_localctx, 170, HogQLParser::RulePlaceholder);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(1302);
    match(HogQLParser::LBRACE);
    setState(1303);
    columnExpr(0);
    setState(1304);
    match(HogQLParser::RBRACE);
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- StringContext ------------------------------------------------------------------

HogQLParser::StringContext::StringContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

tree::TerminalNode* HogQLParser::StringContext::STRING_LITERAL() {
  return getToken(HogQLParser::STRING_LITERAL, 0);
}

HogQLParser::TemplateStringContext* HogQLParser::StringContext::templateString() {
  return getRuleContext<HogQLParser::TemplateStringContext>(0);
}


size_t HogQLParser::StringContext::getRuleIndex() const {
  return HogQLParser::RuleString;
}


std::any HogQLParser::StringContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
    return parserVisitor->visitString(this);
  else
    return visitor->visitChildren(this);
}

HogQLParser::StringContext* HogQLParser::string() {
  StringContext *_localctx = _tracker.createInstance<StringContext>(_ctx, getState());
  enterRule(_localctx, 172, HogQLParser::RuleString);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    setState(1308);
    _errHandler->sync(this);
    switch (_input->LA(1)) {
      case HogQLParser::STRING_LITERAL: {
        enterOuterAlt(_localctx, 1);
        setState(1306);
        match(HogQLParser::STRING_LITERAL);
        break;
      }

      case HogQLParser::QUOTE_SINGLE_TEMPLATE: {
        enterOuterAlt(_localctx, 2);
        setState(1307);
        templateString();
        break;
      }

    default:
      throw NoViableAltException(this);
    }
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- TemplateStringContext ------------------------------------------------------------------

HogQLParser::TemplateStringContext::TemplateStringContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

tree::TerminalNode* HogQLParser::TemplateStringContext::QUOTE_SINGLE_TEMPLATE() {
  return getToken(HogQLParser::QUOTE_SINGLE_TEMPLATE, 0);
}

tree::TerminalNode* HogQLParser::TemplateStringContext::QUOTE_SINGLE() {
  return getToken(HogQLParser::QUOTE_SINGLE, 0);
}

std::vector<HogQLParser::StringContentsContext *> HogQLParser::TemplateStringContext::stringContents() {
  return getRuleContexts<HogQLParser::StringContentsContext>();
}

HogQLParser::StringContentsContext* HogQLParser::TemplateStringContext::stringContents(size_t i) {
  return getRuleContext<HogQLParser::StringContentsContext>(i);
}


size_t HogQLParser::TemplateStringContext::getRuleIndex() const {
  return HogQLParser::RuleTemplateString;
}


std::any HogQLParser::TemplateStringContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
    return parserVisitor->visitTemplateString(this);
  else
    return visitor->visitChildren(this);
}

HogQLParser::TemplateStringContext* HogQLParser::templateString() {
  TemplateStringContext *_localctx = _tracker.createInstance<TemplateStringContext>(_ctx, getState());
  enterRule(_localctx, 174, HogQLParser::RuleTemplateString);
  size_t _la = 0;

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(1310);
    match(HogQLParser::QUOTE_SINGLE_TEMPLATE);
    setState(1314);
    _errHandler->sync(this);
    _la = _input->LA(1);
    while (_la == HogQLParser::STRING_TEXT

    || _la == HogQLParser::STRING_ESCAPE_TRIGGER) {
      setState(1311);
      stringContents();
      setState(1316);
      _errHandler->sync(this);
      _la = _input->LA(1);
    }
    setState(1317);
    match(HogQLParser::QUOTE_SINGLE);
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- StringContentsContext ------------------------------------------------------------------

HogQLParser::StringContentsContext::StringContentsContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

tree::TerminalNode* HogQLParser::StringContentsContext::STRING_ESCAPE_TRIGGER() {
  return getToken(HogQLParser::STRING_ESCAPE_TRIGGER, 0);
}

HogQLParser::ColumnExprContext* HogQLParser::StringContentsContext::columnExpr() {
  return getRuleContext<HogQLParser::ColumnExprContext>(0);
}

tree::TerminalNode* HogQLParser::StringContentsContext::RBRACE() {
  return getToken(HogQLParser::RBRACE, 0);
}

tree::TerminalNode* HogQLParser::StringContentsContext::STRING_TEXT() {
  return getToken(HogQLParser::STRING_TEXT, 0);
}


size_t HogQLParser::StringContentsContext::getRuleIndex() const {
  return HogQLParser::RuleStringContents;
}


std::any HogQLParser::StringContentsContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
    return parserVisitor->visitStringContents(this);
  else
    return visitor->visitChildren(this);
}

HogQLParser::StringContentsContext* HogQLParser::stringContents() {
  StringContentsContext *_localctx = _tracker.createInstance<StringContentsContext>(_ctx, getState());
  enterRule(_localctx, 176, HogQLParser::RuleStringContents);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    setState(1324);
    _errHandler->sync(this);
    switch (_input->LA(1)) {
      case HogQLParser::STRING_ESCAPE_TRIGGER: {
        enterOuterAlt(_localctx, 1);
        setState(1319);
        match(HogQLParser::STRING_ESCAPE_TRIGGER);
        setState(1320);
        columnExpr(0);
        setState(1321);
        match(HogQLParser::RBRACE);
        break;
      }

      case HogQLParser::STRING_TEXT: {
        enterOuterAlt(_localctx, 2);
        setState(1323);
        match(HogQLParser::STRING_TEXT);
        break;
      }

    default:
      throw NoViableAltException(this);
    }
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- FullTemplateStringContext ------------------------------------------------------------------

HogQLParser::FullTemplateStringContext::FullTemplateStringContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

tree::TerminalNode* HogQLParser::FullTemplateStringContext::QUOTE_SINGLE_TEMPLATE_FULL() {
  return getToken(HogQLParser::QUOTE_SINGLE_TEMPLATE_FULL, 0);
}

tree::TerminalNode* HogQLParser::FullTemplateStringContext::EOF() {
  return getToken(HogQLParser::EOF, 0);
}

std::vector<HogQLParser::StringContentsFullContext *> HogQLParser::FullTemplateStringContext::stringContentsFull() {
  return getRuleContexts<HogQLParser::StringContentsFullContext>();
}

HogQLParser::StringContentsFullContext* HogQLParser::FullTemplateStringContext::stringContentsFull(size_t i) {
  return getRuleContext<HogQLParser::StringContentsFullContext>(i);
}


size_t HogQLParser::FullTemplateStringContext::getRuleIndex() const {
  return HogQLParser::RuleFullTemplateString;
}


std::any HogQLParser::FullTemplateStringContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
    return parserVisitor->visitFullTemplateString(this);
  else
    return visitor->visitChildren(this);
}

HogQLParser::FullTemplateStringContext* HogQLParser::fullTemplateString() {
  FullTemplateStringContext *_localctx = _tracker.createInstance<FullTemplateStringContext>(_ctx, getState());
  enterRule(_localctx, 178, HogQLParser::RuleFullTemplateString);
  size_t _la = 0;

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    enterOuterAlt(_localctx, 1);
    setState(1326);
    match(HogQLParser::QUOTE_SINGLE_TEMPLATE_FULL);
    setState(1330);
    _errHandler->sync(this);
    _la = _input->LA(1);
    while (_la == HogQLParser::FULL_STRING_TEXT

    || _la == HogQLParser::FULL_STRING_ESCAPE_TRIGGER) {
      setState(1327);
      stringContentsFull();
      setState(1332);
      _errHandler->sync(this);
      _la = _input->LA(1);
    }
    setState(1333);
    match(HogQLParser::EOF);
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

//----------------- StringContentsFullContext ------------------------------------------------------------------

HogQLParser::StringContentsFullContext::StringContentsFullContext(ParserRuleContext *parent, size_t invokingState)
  : ParserRuleContext(parent, invokingState) {
}

tree::TerminalNode* HogQLParser::StringContentsFullContext::FULL_STRING_ESCAPE_TRIGGER() {
  return getToken(HogQLParser::FULL_STRING_ESCAPE_TRIGGER, 0);
}

HogQLParser::ColumnExprContext* HogQLParser::StringContentsFullContext::columnExpr() {
  return getRuleContext<HogQLParser::ColumnExprContext>(0);
}

tree::TerminalNode* HogQLParser::StringContentsFullContext::RBRACE() {
  return getToken(HogQLParser::RBRACE, 0);
}

tree::TerminalNode* HogQLParser::StringContentsFullContext::FULL_STRING_TEXT() {
  return getToken(HogQLParser::FULL_STRING_TEXT, 0);
}


size_t HogQLParser::StringContentsFullContext::getRuleIndex() const {
  return HogQLParser::RuleStringContentsFull;
}


std::any HogQLParser::StringContentsFullContext::accept(tree::ParseTreeVisitor *visitor) {
  if (auto parserVisitor = dynamic_cast<HogQLParserVisitor*>(visitor))
    return parserVisitor->visitStringContentsFull(this);
  else
    return visitor->visitChildren(this);
}

HogQLParser::StringContentsFullContext* HogQLParser::stringContentsFull() {
  StringContentsFullContext *_localctx = _tracker.createInstance<StringContentsFullContext>(_ctx, getState());
  enterRule(_localctx, 180, HogQLParser::RuleStringContentsFull);

#if __cplusplus > 201703L
  auto onExit = finally([=, this] {
#else
  auto onExit = finally([=] {
#endif
    exitRule();
  });
  try {
    setState(1340);
    _errHandler->sync(this);
    switch (_input->LA(1)) {
      case HogQLParser::FULL_STRING_ESCAPE_TRIGGER: {
        enterOuterAlt(_localctx, 1);
        setState(1335);
        match(HogQLParser::FULL_STRING_ESCAPE_TRIGGER);
        setState(1336);
        columnExpr(0);
        setState(1337);
        match(HogQLParser::RBRACE);
        break;
      }

      case HogQLParser::FULL_STRING_TEXT: {
        enterOuterAlt(_localctx, 2);
        setState(1339);
        match(HogQLParser::FULL_STRING_TEXT);
        break;
      }

    default:
      throw NoViableAltException(this);
    }
   
  }
  catch (RecognitionException &e) {
    _errHandler->reportError(this, e);
    _localctx->exception = std::current_exception();
    _errHandler->recover(this, _localctx->exception);
  }

  return _localctx;
}

bool HogQLParser::sempred(RuleContext *context, size_t ruleIndex, size_t predicateIndex) {
  switch (ruleIndex) {
    case 41: return joinExprSempred(antlrcpp::downCast<JoinExprContext *>(context), predicateIndex);
    case 61: return columnExprSempred(antlrcpp::downCast<ColumnExprContext *>(context), predicateIndex);
    case 71: return tableExprSempred(antlrcpp::downCast<TableExprContext *>(context), predicateIndex);

  default:
    break;
  }
  return true;
}

bool HogQLParser::joinExprSempred(JoinExprContext *_localctx, size_t predicateIndex) {
  switch (predicateIndex) {
    case 0: return precpred(_ctx, 3);
    case 1: return precpred(_ctx, 4);

  default:
    break;
  }
  return true;
}

bool HogQLParser::columnExprSempred(ColumnExprContext *_localctx, size_t predicateIndex) {
  switch (predicateIndex) {
    case 2: return precpred(_ctx, 19);
    case 3: return precpred(_ctx, 18);
    case 4: return precpred(_ctx, 17);
    case 5: return precpred(_ctx, 15);
    case 6: return precpred(_ctx, 13);
    case 7: return precpred(_ctx, 12);
    case 8: return precpred(_ctx, 11);
    case 9: return precpred(_ctx, 10);
    case 10: return precpred(_ctx, 31);
    case 11: return precpred(_ctx, 30);
    case 12: return precpred(_ctx, 26);
    case 13: return precpred(_ctx, 25);
    case 14: return precpred(_ctx, 24);
    case 15: return precpred(_ctx, 23);
    case 16: return precpred(_ctx, 22);
    case 17: return precpred(_ctx, 21);
    case 18: return precpred(_ctx, 16);
    case 19: return precpred(_ctx, 9);

  default:
    break;
  }
  return true;
}

bool HogQLParser::tableExprSempred(TableExprContext *_localctx, size_t predicateIndex) {
  switch (predicateIndex) {
    case 20: return precpred(_ctx, 3);

  default:
    break;
  }
  return true;
}

void HogQLParser::initialize() {
#if ANTLR4_USE_THREAD_LOCAL_CACHE
  hogqlparserParserInitialize();
#else
  ::antlr4::internal::call_once(hogqlparserParserOnceFlag, hogqlparserParserInitialize);
#endif
}
